This commit is contained in:
Galudisu
2025-12-14 20:16:57 +08:00
parent a5fb62f1e5
commit 43c374dec0
92 changed files with 374 additions and 254 deletions

3
docker/copy.sh Normal file → Executable file
View File

@@ -10,7 +10,8 @@ usage() {
# copy sql
echo "begin copy sql "
cp ../sql/ry_20250523.sql ./mysql/db
cp ../sql/ry_config_20250224.sql ./mysql/db
cp ../sql/ry_config*.sql ./mysql/db
cp ../sql/ry_seata*.sql ./mysql/db
# copy html
echo "begin copy html "

9
docker/deploy.sh Normal file → Executable file
View File

@@ -10,6 +10,7 @@ usage() {
port(){
firewall-cmd --add-port=80/tcp --permanent
firewall-cmd --add-port=8080/tcp --permanent
firewall-cmd --add-port=8181/tcp --permanent
firewall-cmd --add-port=8848/tcp --permanent
firewall-cmd --add-port=9848/tcp --permanent
firewall-cmd --add-port=9849/tcp --permanent
@@ -26,22 +27,22 @@ port(){
# 启动基础环境(必须)
base(){
docker-compose up -d ruoyi-mysql ruoyi-redis ruoyi-nacos
docker compose up -d ruoyi-mysql ruoyi-redis ruoyi-nacos
}
# 启动程序模块(必须)
modules(){
docker-compose up -d ruoyi-nginx ruoyi-gateway ruoyi-auth ruoyi-modules-system
docker compose up -d ruoyi-nginx ruoyi-gateway ruoyi-auth ruoyi-modules-system
}
# 关闭所有环境/模块
stop(){
docker-compose stop
docker compose stop
}
# 删除所有环境/模块
rm(){
docker-compose rm
docker compose rm
}
# 根据输入参数,选择执行对应方法,不输入则执行使用说明

View File

@@ -1,4 +1,3 @@
version : '3.8'
services:
ruoyi-nacos:
container_name: ruoyi-nacos
@@ -7,10 +6,17 @@ services:
context: ./nacos
environment:
- MODE=standalone
- NACOS_AUTH_ENABLE=true
- NACOS_AUTH_TOKEN=U2VjcmV0S2V5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5
- NACOS_AUTH_ENABLE=true
- NACOS_AUTH_CACHE_ENABLE=true
- NACOS_AUTH_IDENTITY_KEY=serverIdentity
- NACOS_AUTH_IDENTITY_VALUE=security
volumes:
- ./nacos/logs/:/home/nacos/logs
- ./nacos/conf/application.properties:/home/nacos/conf/application.properties
ports:
- "8181:8080"
- "8848:8848"
- "9848:9848"
- "9849:9849"
@@ -69,7 +75,7 @@ services:
container_name: ruoyi-gateway
build:
context: ./ruoyi/gateway
dockerfile: ruoyi/gateway/Dockerfile
dockerfile: Dockerfile
ports:
- "8080:8080"
depends_on:
@@ -80,7 +86,7 @@ services:
container_name: ruoyi-auth
build:
context: ./ruoyi/auth
dockerfile: ruoyi/auth/Dockerfile
dockerfile: Dockerfile
ports:
- "9200:9200"
depends_on:
@@ -91,7 +97,7 @@ services:
container_name: ruoyi-modules-system
build:
context: ./ruoyi/modules/system
dockerfile: ruoyi/modules/system/Dockerfile
dockerfile: Dockerfile
ports:
- "9201:9201"
depends_on:
@@ -104,7 +110,7 @@ services:
container_name: ruoyi-modules-gen
build:
context: ./ruoyi/modules/gen
dockerfile: ruoyi/modules/gen/Dockerfile
dockerfile: Dockerfile
ports:
- "9202:9202"
depends_on:
@@ -115,7 +121,7 @@ services:
container_name: ruoyi-modules-job
build:
context: ./ruoyi/modules/job
dockerfile: ruoyi/modules/job/Dockerfile
dockerfile: Dockerfile
ports:
- "9203:9203"
depends_on:
@@ -126,7 +132,7 @@ services:
container_name: ruoyi-modules-file
build:
context: ./ruoyi/modules/file
dockerfile: ruoyi/modules/file/Dockerfile
dockerfile: Dockerfile
ports:
- "9300:9300"
volumes:
@@ -135,6 +141,6 @@ services:
container_name: ruoyi-visual-monitor
build:
context: ./ruoyi/visual/monitor
dockerfile: ruoyi/visual/monitor/Dockerfile
dockerfile: Dockerfile
ports:
- "9100:9100"

View File

@@ -1,5 +1,5 @@
# 基础镜像
FROM nacos/nacos-server
FROM nacos/nacos-server:v3.1.1
# author
LABEL org.opencontainers.image.authors="ruoyi"

View File

@@ -22,11 +22,12 @@ nacos.security.ignore.urls=/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/
nacos.core.auth.system.type=nacos
nacos.core.auth.enabled=false
nacos.core.auth.default.token.expire.seconds=18000
nacos.core.auth.default.token.secret.key=SecretKey012345678901234567890123456789012345678901234567890123456789
nacos.core.auth.plugin.nacos.token.expire.seconds=18000
nacos.core.auth.plugin.nacos.token.secret.key=U2VjcmV0S2V5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5
nacos.core.auth.caching.enabled=true
nacos.core.auth.enable.userAgentAuthWhite=false
nacos.core.auth.server.identity.key=serverIdentity
nacos.core.auth.server.identity.value=security
nacos.istio.mcp.server.enabled=false

View File

@@ -1,5 +1,5 @@
# 基础镜像
FROM openjdk:8-jre
FROM maven:3.9.11-eclipse-temurin-8-alpine
# author
LABEL org.opencontainers.image.authors="ruoyi"
@@ -12,4 +12,4 @@ WORKDIR /home/ruoyi
# 复制jar文件到路径
COPY ./jar/ruoyi-auth.jar /home/ruoyi/ruoyi-auth.jar
# 启动认证服务
ENTRYPOINT ["java","-jar","ruoyi-auth.jar"]
ENTRYPOINT ["java","-jar","ruoyi-auth.jar"]

View File

@@ -1,5 +1,5 @@
# 基础镜像
FROM openjdk:8-jre
FROM maven:3.9.11-eclipse-temurin-8-alpine
# author
LABEL org.opencontainers.image.authors="ruoyi"
@@ -12,4 +12,4 @@ WORKDIR /home/ruoyi
# 复制jar文件到路径
COPY ./jar/ruoyi-gateway.jar /home/ruoyi/ruoyi-gateway.jar
# 启动网关服务
ENTRYPOINT ["java","-jar","ruoyi-gateway.jar"]
ENTRYPOINT ["java","-jar","ruoyi-gateway.jar"]

View File

@@ -1,5 +1,5 @@
# 基础镜像
FROM openjdk:8-jre
FROM maven:3.9.11-eclipse-temurin-8-alpine
# author
LABEL org.opencontainers.image.authors="ruoyi"
@@ -12,4 +12,4 @@ WORKDIR /home/ruoyi
# 复制jar文件到路径
COPY ./jar/ruoyi-modules-file.jar /home/ruoyi/ruoyi-modules-file.jar
# 启动文件服务
ENTRYPOINT ["java","-jar","ruoyi-modules-file.jar"]
ENTRYPOINT ["java","-jar","ruoyi-modules-file.jar"]

View File

@@ -1,5 +1,5 @@
# 基础镜像
FROM openjdk:8-jre
FROM maven:3.9.11-eclipse-temurin-8-alpine
# author
LABEL org.opencontainers.image.authors="ruoyi"
@@ -12,4 +12,4 @@ WORKDIR /home/ruoyi
# 复制jar文件到路径
COPY ./jar/ruoyi-modules-gen.jar /home/ruoyi/ruoyi-modules-gen.jar
# 启动代码生成服务
ENTRYPOINT ["java","-jar","ruoyi-modules-gen.jar"]
ENTRYPOINT ["java","-jar","ruoyi-modules-gen.jar"]

View File

@@ -1,5 +1,5 @@
# 基础镜像
FROM openjdk:8-jre
FROM maven:3.9.11-eclipse-temurin-8-alpine
# author
LABEL org.opencontainers.image.authors="ruoyi"
@@ -12,4 +12,4 @@ WORKDIR /home/ruoyi
# 复制jar文件到路径
COPY ./jar/ruoyi-modules-job.jar /home/ruoyi/ruoyi-modules-job.jar
# 启动定时任务服务
ENTRYPOINT ["java","-jar","ruoyi-modules-job.jar"]
ENTRYPOINT ["java","-jar","ruoyi-modules-job.jar"]

View File

@@ -1,5 +1,5 @@
# 基础镜像
FROM openjdk:8-jre
FROM maven:3.9.11-eclipse-temurin-8-alpine
# author
LABEL org.opencontainers.image.authors="ruoyi"
@@ -12,4 +12,4 @@ WORKDIR /home/ruoyi
# 复制jar文件到路径
COPY ./jar/ruoyi-modules-system.jar /home/ruoyi/ruoyi-modules-system.jar
# 启动系统服务
ENTRYPOINT ["java","-jar","ruoyi-modules-system.jar"]
ENTRYPOINT ["java","-jar","ruoyi-modules-system.jar"]

View File

@@ -1,5 +1,5 @@
# 基础镜像
FROM openjdk:8-jre
FROM maven:3.9.11-eclipse-temurin-8-alpine
# author
LABEL org.opencontainers.image.authors="ruoyi"
@@ -12,4 +12,4 @@ WORKDIR /home/ruoyi
# 复制jar文件到路径
COPY ./jar/ruoyi-visual-monitor.jar /home/ruoyi/ruoyi-visual-monitor.jar
# 启动系统服务
ENTRYPOINT ["java","-jar","ruoyi-visual-monitor.jar"]
ENTRYPOINT ["java","-jar","ruoyi-visual-monitor.jar"]