mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2025-09-08 13:27:46 +00:00
update 独立 bom 工程管理 alibaba 相关依赖
This commit is contained in:
@@ -1,41 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 复制项目的文件到对应docker路径,便于一键生成镜像。
|
||||
usage() {
|
||||
echo "Usage: sh copy.sh"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
# copy sql
|
||||
echo "begin copy sql "
|
||||
cp ../sql/ry_20210908.sql ./mysql/db
|
||||
cp ../sql/ry_config_20211118.sql ./mysql/db
|
||||
|
||||
# copy html
|
||||
echo "begin copy html "
|
||||
cp -r ../ruoyi-ui/dist/** ./nginx/html/dist
|
||||
|
||||
|
||||
# copy jar
|
||||
echo "begin copy ruoyi-gateway "
|
||||
cp ../ruoyi-gateway/target/ruoyi-gateway.jar ./ruoyi/gateway/jar
|
||||
|
||||
echo "begin copy ruoyi-auth "
|
||||
cp ../ruoyi-auth/target/ruoyi-auth.jar ./ruoyi/auth/jar
|
||||
|
||||
echo "begin copy ruoyi-visual "
|
||||
cp ../ruoyi-visual/ruoyi-monitor/target/ruoyi-visual-monitor.jar ./ruoyi/visual/monitor/jar
|
||||
|
||||
echo "begin copy ruoyi-modules-system "
|
||||
cp ../ruoyi-modules/ruoyi-system/target/ruoyi-modules-system.jar ./ruoyi/modules/system/jar
|
||||
|
||||
echo "begin copy ruoyi-modules-file "
|
||||
cp ../ruoyi-modules/ruoyi-file/target/ruoyi-modules-file.jar ./ruoyi/modules/file/jar
|
||||
|
||||
echo "begin copy ruoyi-modules-job "
|
||||
cp ../ruoyi-modules/ruoyi-job/target/ruoyi-modules-job.jar ./ruoyi/modules/job/jar
|
||||
|
||||
echo "begin copy ruoyi-modules-gen "
|
||||
cp ../ruoyi-modules/ruoyi-gen/target/ruoyi-modules-gen.jar ./ruoyi/modules/gen/jar
|
||||
|
131
docker/deploy.sh
131
docker/deploy.sh
@@ -1,67 +1,126 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
# 使用说明,用来提示输入参数
|
||||
#使用说明,用来提示输入参数
|
||||
usage() {
|
||||
echo "Usage: sh 执行脚本.sh [port|base|modules|stop|rm]"
|
||||
exit 1
|
||||
echo "Usage: sh 执行脚本.sh [port|mount|monitor|base|start|stop|stopall|rm|rmiNoneTag]"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# 开启所需端口
|
||||
#开启所需端口(生产环境不推荐开启)
|
||||
port(){
|
||||
firewall-cmd --add-port=80/tcp --permanent
|
||||
firewall-cmd --add-port=8080/tcp --permanent
|
||||
firewall-cmd --add-port=8848/tcp --permanent
|
||||
firewall-cmd --add-port=9848/tcp --permanent
|
||||
firewall-cmd --add-port=9849/tcp --permanent
|
||||
firewall-cmd --add-port=6379/tcp --permanent
|
||||
firewall-cmd --add-port=3306/tcp --permanent
|
||||
firewall-cmd --add-port=9100/tcp --permanent
|
||||
firewall-cmd --add-port=9200/tcp --permanent
|
||||
firewall-cmd --add-port=9201/tcp --permanent
|
||||
firewall-cmd --add-port=9202/tcp --permanent
|
||||
firewall-cmd --add-port=9203/tcp --permanent
|
||||
firewall-cmd --add-port=9300/tcp --permanent
|
||||
service firewalld restart
|
||||
# mysql 端口
|
||||
firewall-cmd --add-port=3306/tcp --permanent
|
||||
# redis 端口
|
||||
firewall-cmd --add-port=6379/tcp --permanent
|
||||
# minio api 端口
|
||||
firewall-cmd --add-port=9000/tcp --permanent
|
||||
# minio 控制台端口
|
||||
firewall-cmd --add-port=9001/tcp --permanent
|
||||
# 监控中心端口
|
||||
firewall-cmd --add-port=9100/tcp --permanent
|
||||
# 任务调度中心端口
|
||||
firewall-cmd --add-port=9900/tcp --permanent
|
||||
# nacos端口
|
||||
firewall-cmd --add-port=8848/tcp --permanent
|
||||
firewall-cmd --add-port=9848/tcp --permanent
|
||||
firewall-cmd --add-port=9849/tcp --permanent
|
||||
# sentinel端口
|
||||
firewall-cmd --add-port=8718/tcp --permanent
|
||||
# seata端口
|
||||
firewall-cmd --add-port=8091/tcp --permanent
|
||||
# 重启防火墙
|
||||
service firewalld restart
|
||||
}
|
||||
|
||||
# 启动基础环境(必须)
|
||||
##放置挂载文件
|
||||
mount(){
|
||||
#挂载 nginx 配置文件
|
||||
if test ! -f "/docker/nginx/conf/nginx.conf" ;then
|
||||
mkdir -p /docker/nginx/conf
|
||||
cp nginx/nginx.conf /docker/nginx/conf/nginx.conf
|
||||
fi
|
||||
#挂载 redis 配置文件
|
||||
if test ! -f "/docker/redis/conf/redis.conf" ;then
|
||||
mkdir -p /docker/redis/conf
|
||||
cp redis/redis.conf /docker/redis/conf/redis.conf
|
||||
fi
|
||||
#挂载 nacos 配置文件
|
||||
if test ! -f "/docker/nacos/conf/custom.properties" ;then
|
||||
mkdir -p /docker/nacos/conf
|
||||
cp seata/custom.properties /docker/nacos/conf/custom.properties
|
||||
fi
|
||||
#挂载 seata 配置文件
|
||||
if test ! -f "/docker/seata/conf/registry.conf" ;then
|
||||
mkdir -p /docker/seata/conf
|
||||
cp seata/registry.conf /docker/seata/conf/registry.conf
|
||||
fi
|
||||
}
|
||||
|
||||
#启动基础模块
|
||||
base(){
|
||||
docker-compose up -d ruoyi-mysql ruoyi-redis ruoyi-nacos
|
||||
docker-compose up -d mysql nacos sentinel seata nginx-web redis minio
|
||||
}
|
||||
|
||||
# 启动程序模块(必须)
|
||||
modules(){
|
||||
docker-compose up -d ruoyi-nginx ruoyi-gateway ruoyi-auth ruoyi-modules-system
|
||||
#启动监控模块
|
||||
monitor(){
|
||||
docker-compose up -d ruoyi-monitor
|
||||
}
|
||||
|
||||
# 关闭所有环境/模块
|
||||
#启动程序模块
|
||||
start(){
|
||||
docker-compose up -d ruoyi-gateway ruoyi-auth ruoyi-xxl-job-admin ruoyi-system ruoyi-resource
|
||||
}
|
||||
|
||||
#停止程序模块
|
||||
stop(){
|
||||
docker-compose stop
|
||||
docker-compose stop ruoyi-gateway ruoyi-auth ruoyi-xxl-job-admin ruoyi-system ruoyi-resource
|
||||
}
|
||||
|
||||
# 删除所有环境/模块
|
||||
#关闭所有模块
|
||||
stopall(){
|
||||
docker-compose stop
|
||||
}
|
||||
|
||||
#删除所有模块
|
||||
rm(){
|
||||
docker-compose rm
|
||||
docker-compose rm
|
||||
}
|
||||
|
||||
# 根据输入参数,选择执行对应方法,不输入则执行使用说明
|
||||
#删除Tag为空的镜像
|
||||
rmiNoneTag(){
|
||||
docker images|grep none|awk '{print $3}'|xargs docker rmi -f
|
||||
}
|
||||
|
||||
#根据输入参数,选择执行对应方法,不输入则执行使用说明
|
||||
case "$1" in
|
||||
"port")
|
||||
port
|
||||
port
|
||||
;;
|
||||
"mount")
|
||||
mount
|
||||
;;
|
||||
"base")
|
||||
base
|
||||
base
|
||||
;;
|
||||
"modules")
|
||||
modules
|
||||
"monitor")
|
||||
monitor
|
||||
;;
|
||||
"start")
|
||||
start
|
||||
;;
|
||||
"stop")
|
||||
stop
|
||||
stop
|
||||
;;
|
||||
"stopall")
|
||||
stopall
|
||||
;;
|
||||
"rm")
|
||||
rm
|
||||
rm
|
||||
;;
|
||||
"rmiNoneTag")
|
||||
rmiNoneTag
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
|
@@ -1,140 +1,270 @@
|
||||
version : '3.8'
|
||||
services:
|
||||
ruoyi-nacos:
|
||||
container_name: ruoyi-nacos
|
||||
image: nacos/nacos-server
|
||||
build:
|
||||
context: ./nacos
|
||||
environment:
|
||||
- MODE=standalone
|
||||
volumes:
|
||||
- ./nacos/logs/:/home/nacos/logs
|
||||
- ./nacos/conf/application.properties:/home/nacos/conf/application.properties
|
||||
ports:
|
||||
- "8848:8848"
|
||||
- "9848:9848"
|
||||
- "9849:9849"
|
||||
depends_on:
|
||||
- ruoyi-mysql
|
||||
ruoyi-mysql:
|
||||
container_name: ruoyi-mysql
|
||||
image: mysql:5.7
|
||||
build:
|
||||
context: ./mysql
|
||||
ports:
|
||||
- "3306:3306"
|
||||
volumes:
|
||||
- ./mysql/conf:/etc/mysql/conf.d
|
||||
- ./mysql/logs:/logs
|
||||
- ./mysql/data:/var/lib/mysql
|
||||
command: [
|
||||
'mysqld',
|
||||
'--innodb-buffer-pool-size=80M',
|
||||
'--character-set-server=utf8mb4',
|
||||
'--collation-server=utf8mb4_unicode_ci',
|
||||
'--default-time-zone=+8:00',
|
||||
'--lower-case-table-names=1'
|
||||
]
|
||||
environment:
|
||||
MYSQL_DATABASE: 'ry-cloud'
|
||||
MYSQL_ROOT_PASSWORD: password
|
||||
ruoyi-redis:
|
||||
container_name: ruoyi-redis
|
||||
image: redis
|
||||
build:
|
||||
context: ./redis
|
||||
ports:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- ./redis/conf/redis.conf:/home/ruoyi/redis/redis.conf
|
||||
- ./redis/data:/data
|
||||
command: redis-server /home/ruoyi/redis/redis.conf
|
||||
ruoyi-nginx:
|
||||
container_name: ruoyi-nginx
|
||||
image: nginx
|
||||
build:
|
||||
context: ./nginx
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- ./nginx/html/dist:/home/ruoyi/projects/ruoyi-ui
|
||||
- ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./nginx/logs:/var/log/nginx
|
||||
- ./nginx/conf.d:/etc/nginx/conf.d
|
||||
depends_on:
|
||||
- ruoyi-gateway
|
||||
links:
|
||||
- ruoyi-gateway
|
||||
ruoyi-gateway:
|
||||
container_name: ruoyi-gateway
|
||||
build:
|
||||
context: ./ruoyi/gateway
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "8080:8080"
|
||||
depends_on:
|
||||
- ruoyi-redis
|
||||
links:
|
||||
- ruoyi-redis
|
||||
ruoyi-auth:
|
||||
container_name: ruoyi-auth
|
||||
build:
|
||||
context: ./ruoyi/auth
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9200:9200"
|
||||
depends_on:
|
||||
- ruoyi-redis
|
||||
links:
|
||||
- ruoyi-redis
|
||||
ruoyi-modules-system:
|
||||
container_name: ruoyi-modules-system
|
||||
build:
|
||||
context: ./ruoyi/modules/system
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9201:9201"
|
||||
depends_on:
|
||||
- ruoyi-redis
|
||||
- ruoyi-mysql
|
||||
links:
|
||||
- ruoyi-redis
|
||||
- ruoyi-mysql
|
||||
ruoyi-modules-gen:
|
||||
container_name: ruoyi-modules-gen
|
||||
build:
|
||||
context: ./ruoyi/modules/gen
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9202:9202"
|
||||
depends_on:
|
||||
- ruoyi-mysql
|
||||
links:
|
||||
- ruoyi-mysql
|
||||
ruoyi-modules-job:
|
||||
container_name: ruoyi-modules-job
|
||||
build:
|
||||
context: ./ruoyi/modules/job
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9203:9203"
|
||||
depends_on:
|
||||
- ruoyi-mysql
|
||||
links:
|
||||
- ruoyi-mysql
|
||||
ruoyi-modules-file:
|
||||
container_name: ruoyi-modules-file
|
||||
build:
|
||||
context: ./ruoyi/modules/file
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9300:9300"
|
||||
volumes:
|
||||
- ./ruoyi/uploadPath:/home/ruoyi/uploadPath
|
||||
ruoyi-visual-monitor:
|
||||
container_name: ruoyi-visual-monitor
|
||||
build:
|
||||
context: ./ruoyi/visual/monitor
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9100:9100"
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:8.0.27
|
||||
container_name: mysql
|
||||
environment:
|
||||
# 时区上海
|
||||
TZ: Asia/Shanghai
|
||||
# root 密码
|
||||
MYSQL_ROOT_PASSWORD: ruoyi123
|
||||
# 初始化数据库
|
||||
MYSQL_DATABASE: ry-cloud
|
||||
ports:
|
||||
- 3306:3306
|
||||
volumes:
|
||||
# 数据挂载
|
||||
- /docker/mysql/data/:/var/lib/mysql/
|
||||
# 配置挂载
|
||||
- /docker/mysql/conf/:/etc/mysql/conf.d/
|
||||
command:
|
||||
# 将mysql8.0默认密码策略 修改为 原先 策略 (mysql8.0对其默认策略做了更改 会导致密码无法匹配)
|
||||
--default-authentication-plugin=mysql_native_password
|
||||
--character-set-server=utf8mb4
|
||||
--collation-server=utf8mb4_general_ci
|
||||
--explicit_defaults_for_timestamp=true
|
||||
--lower_case_table_names=1
|
||||
privileged: true
|
||||
restart: always
|
||||
networks:
|
||||
ruoyi_net:
|
||||
ipv4_address: 172.30.0.36
|
||||
|
||||
nacos:
|
||||
image: nacos/nacos-server:2.0.4
|
||||
container_name: nacos
|
||||
ports:
|
||||
- 8848:8848
|
||||
- 9848:9848
|
||||
- 9849:9849
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
MODE: standalone
|
||||
SPRING_DATASOURCE_PLATFORM: mysql
|
||||
MYSQL_SERVICE_HOST: 172.30.0.36
|
||||
MYSQL_SERVICE_PORT: 3306
|
||||
MYSQL_SERVICE_USER: root
|
||||
MYSQL_SERVICE_PASSWORD: ruoyi123
|
||||
MYSQL_SERVICE_DB_NAME: ry-config
|
||||
MYSQL_SERVICE_DB_PARAM: characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
|
||||
volumes:
|
||||
- /docker/nacos/logs/:/home/nacos/logs
|
||||
- /docker/nacos/config/custom.properties:/home/nacos/init.d/custom.properties
|
||||
privileged: true
|
||||
restart: always
|
||||
networks:
|
||||
ruoyi_net:
|
||||
ipv4_address: 172.30.0.40
|
||||
|
||||
redis:
|
||||
image: redis:6.2.6
|
||||
container_name: redis
|
||||
ports:
|
||||
- 6379:6379
|
||||
environment:
|
||||
# 时区上海
|
||||
TZ: Asia/Shanghai
|
||||
volumes:
|
||||
# 配置文件
|
||||
- /docker/redis/conf:/redis/config
|
||||
# 数据文件
|
||||
- /docker/redis/data/:/redis/data/
|
||||
command: "redis-server /redis/config/redis.conf"
|
||||
privileged: true
|
||||
restart: always
|
||||
networks:
|
||||
ruoyi_net:
|
||||
ipv4_address: 172.30.0.48
|
||||
|
||||
minio:
|
||||
image: minio/minio:RELEASE.2021-10-27T16-29-42Z
|
||||
container_name: minio
|
||||
ports:
|
||||
# api 端口
|
||||
- 9000:9000
|
||||
# 控制台端口
|
||||
- 9001:9001
|
||||
environment:
|
||||
# 时区上海
|
||||
TZ: Asia/Shanghai
|
||||
# 管理后台用户名
|
||||
MINIO_ACCESS_KEY: ruoyi
|
||||
# 管理后台密码,最小8个字符
|
||||
MINIO_SECRET_KEY: ruoyi123
|
||||
volumes:
|
||||
# 映射当前目录下的data目录至容器内/data目录
|
||||
- /docker/minio/data:/data
|
||||
# 映射配置目录
|
||||
- /docker/minio/config:/root/.minio/
|
||||
command: server --console-address ':9001' /data # 指定容器中的目录 /data
|
||||
privileged: true
|
||||
restart: always
|
||||
networks:
|
||||
ruoyi_net:
|
||||
ipv4_address: 172.30.0.54
|
||||
|
||||
seata-server:
|
||||
image: seataio/seata-server:1.4.2
|
||||
container_name: seata-server
|
||||
ports:
|
||||
- 8091:8091
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
# 注意 此处ip如果是外网使用 要改为外网ip
|
||||
SEATA_IP: 172.30.0.58
|
||||
SEATA_PORT: 8091
|
||||
STORE_MODE: db
|
||||
SEATA_CONFIG_NAME: file:/root/seata-config/registry
|
||||
volumes:
|
||||
- /docker/seata/config:/root/seata-config
|
||||
privileged: true
|
||||
restart: always
|
||||
networks:
|
||||
ruoyi_net:
|
||||
ipv4_address: 172.30.0.58
|
||||
|
||||
nginx-web:
|
||||
image: nginx:1.21.3
|
||||
container_name: nginx-web
|
||||
environment:
|
||||
# 时区上海
|
||||
TZ: Asia/Shanghai
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
volumes:
|
||||
# 证书映射
|
||||
- /docker/nginx/cert:/etc/nginx/cert
|
||||
# 配置文件映射
|
||||
- /docker/nginx/conf/nginx.conf:/etc/nginx/nginx.conf
|
||||
# 页面目录
|
||||
- /docker/nginx/html:/usr/share/nginx/html
|
||||
# 日志目录
|
||||
- /docker/nginx/log:/var/log/nginx
|
||||
privileged: true
|
||||
restart: always
|
||||
networks:
|
||||
- ruoyi_net
|
||||
|
||||
sentinel:
|
||||
image: ruoyi/ruoyi-sentinel-dashboard:0.6.0
|
||||
container_name: sentinel
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
ports:
|
||||
- 8718:8718
|
||||
volumes:
|
||||
# 配置文件
|
||||
- /docker/ruoyi-sentinel-dashboard/logs/:/ruoyi/sentinel-dashboard/logs
|
||||
restart: always
|
||||
networks:
|
||||
ruoyi_net:
|
||||
ipv4_address: 172.30.0.68
|
||||
|
||||
ruoyi-monitor-admin:
|
||||
image: ruoyi/ruoyi-monitor:0.6.0
|
||||
container_name: ruoyi-monitor
|
||||
environment:
|
||||
# 时区上海
|
||||
TZ: Asia/Shanghai
|
||||
ports:
|
||||
- 9100:9100
|
||||
volumes:
|
||||
# 配置文件
|
||||
- /docker/ruoyi-monitor/logs/:/ruoyi/monitor/logs
|
||||
privileged: true
|
||||
restart: always
|
||||
networks:
|
||||
ruoyi_net:
|
||||
ipv4_address: 172.30.0.90
|
||||
|
||||
ruoyi-xxl-job-admin:
|
||||
image: ruoyi/ruoyi-xxl-job-admin:0.6.0
|
||||
container_name: ruoyi-xxl-job-admin
|
||||
environment:
|
||||
# 时区上海
|
||||
TZ: Asia/Shanghai
|
||||
ports:
|
||||
- 9900:9900
|
||||
volumes:
|
||||
# 配置文件
|
||||
- /docker/ruoyi-xxl-job-admin/logs/:/ruoyi/xxl-job-admin/logs
|
||||
privileged: true
|
||||
restart: always
|
||||
networks:
|
||||
ruoyi_net:
|
||||
ipv4_address: 172.30.0.92
|
||||
|
||||
ruoyi-gateway:
|
||||
image: ruoyi/ruoyi-gateway:0.6.0
|
||||
container_name: ruoyi-gateway
|
||||
environment:
|
||||
# 时区上海
|
||||
TZ: Asia/Shanghai
|
||||
ports:
|
||||
- 8080:8080
|
||||
volumes:
|
||||
# 配置文件
|
||||
- /docker/ruoyi-gateway/logs/:/ruoyi/gateway/logs
|
||||
privileged: true
|
||||
restart: always
|
||||
networks:
|
||||
ruoyi_net:
|
||||
ipv4_address: 172.30.0.100
|
||||
|
||||
ruoyi-auth:
|
||||
image: ruoyi/ruoyi-auth:0.6.0
|
||||
container_name: ruoyi-auth
|
||||
environment:
|
||||
# 时区上海
|
||||
TZ: Asia/Shanghai
|
||||
ports:
|
||||
- 9200:9200
|
||||
volumes:
|
||||
# 配置文件
|
||||
- /docker/ruoyi-auth/logs/:/ruoyi/auth/logs
|
||||
privileged: true
|
||||
restart: always
|
||||
networks:
|
||||
ruoyi_net:
|
||||
ipv4_address: 172.30.0.110
|
||||
|
||||
ruoyi-system:
|
||||
image: ruoyi/ruoyi-system:0.6.0
|
||||
container_name: ruoyi-system
|
||||
environment:
|
||||
# 时区上海
|
||||
TZ: Asia/Shanghai
|
||||
ports:
|
||||
- 9201:9201
|
||||
volumes:
|
||||
# 配置文件
|
||||
- /docker/ruoyi-system/logs/:/ruoyi/system/logs
|
||||
privileged: true
|
||||
restart: always
|
||||
networks:
|
||||
- ruoyi_net
|
||||
|
||||
ruoyi-resource:
|
||||
image: ruoyi/ruoyi-resource:0.6.0
|
||||
container_name: ruoyi-resource
|
||||
environment:
|
||||
# 时区上海
|
||||
TZ: Asia/Shanghai
|
||||
ports:
|
||||
- 9300:9300
|
||||
volumes:
|
||||
# 配置文件
|
||||
- /docker/ruoyi-resource/logs/:/ruoyi/resource/logs
|
||||
privileged: true
|
||||
restart: always
|
||||
networks:
|
||||
- ruoyi_net
|
||||
|
||||
networks:
|
||||
ruoyi_net:
|
||||
driver: bridge
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 172.30.0.0/16
|
||||
|
@@ -1 +0,0 @@
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>sqlĿ¼<EFBFBD>µ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>нű<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>docker<EFBFBD>Զ<EFBFBD>ִ<EFBFBD>С<EFBFBD>
|
@@ -1,7 +0,0 @@
|
||||
# 基础镜像
|
||||
FROM mysql:5.7
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 执行sql脚本
|
||||
ADD ./db/*.sql /docker-entrypoint-initdb.d/
|
@@ -1,32 +0,0 @@
|
||||
spring.datasource.platform=mysql
|
||||
db.num=1
|
||||
db.url.0=jdbc:mysql://ruoyi-mysql:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
|
||||
db.user=root
|
||||
db.password=password
|
||||
|
||||
nacos.naming.empty-service.auto-clean=true
|
||||
nacos.naming.empty-service.clean.initial-delay-ms=50000
|
||||
nacos.naming.empty-service.clean.period-time-ms=30000
|
||||
|
||||
management.endpoints.web.exposure.include=*
|
||||
|
||||
management.metrics.export.elastic.enabled=false
|
||||
management.metrics.export.influx.enabled=false
|
||||
|
||||
server.tomcat.accesslog.enabled=true
|
||||
server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i
|
||||
|
||||
server.tomcat.basedir=
|
||||
|
||||
nacos.security.ignore.urls=/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-ui/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
|
||||
|
||||
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.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
|
19
docker/nacos/custom.properties
Normal file
19
docker/nacos/custom.properties
Normal file
@@ -0,0 +1,19 @@
|
||||
#spring.security.enabled=false
|
||||
#management.security=false
|
||||
#security.basic.enabled=false
|
||||
#nacos.security.ignore.urls=/**
|
||||
#management.metrics.export.elastic.host=http://localhost:9200
|
||||
# metrics for prometheus
|
||||
management.endpoints.web.exposure.include=*
|
||||
|
||||
# metrics for elastic search
|
||||
#management.metrics.export.elastic.enabled=false
|
||||
#management.metrics.export.elastic.host=http://localhost:9200
|
||||
|
||||
# metrics for influx
|
||||
#management.metrics.export.influx.enabled=false
|
||||
#management.metrics.export.influx.db=springboot
|
||||
#management.metrics.export.influx.uri=http://localhost:8086
|
||||
#management.metrics.export.influx.auto-create-db=true
|
||||
#management.metrics.export.influx.consistency=one
|
||||
#management.metrics.export.influx.compressed=true
|
@@ -1,7 +0,0 @@
|
||||
# 基础镜像
|
||||
FROM nacos/nacos-server
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 复制conf文件到路径
|
||||
COPY ./conf/application.properties /home/nacos/conf/application.properties
|
@@ -1,36 +0,0 @@
|
||||
worker_processes 1;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
root /home/ruoyi/projects/ruoyi-ui;
|
||||
try_files $uri $uri/ /index.html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
location /prod-api/{
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header REMOTE-HOST $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass http://ruoyi-gateway:8080/;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root html;
|
||||
}
|
||||
}
|
||||
}# requirepass 123456
|
@@ -1,15 +0,0 @@
|
||||
# 基础镜像
|
||||
FROM nginx
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi/projects/ruoyi-ui
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi/projects/ruoyi-ui
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi/projects/ruoyi-ui
|
||||
# 复制conf文件到路径
|
||||
COPY ./conf/nginx.conf /etc/nginx/nginx.conf
|
||||
# 复制html文件到路径
|
||||
COPY ./html/dist /home/ruoyi/projects/ruoyi-ui
|
1
docker/nginx/html/dist/readme.txt
vendored
1
docker/nginx/html/dist/readme.txt
vendored
@@ -1 +0,0 @@
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD>ruoyi-ui<75><69><EFBFBD><EFBFBD><EFBFBD>õľ<C3B5>̬<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>nginx<6E><78><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʡ<EFBFBD>
|
106
docker/nginx/nginx.conf
Normal file
106
docker/nginx/nginx.conf
Normal file
@@ -0,0 +1,106 @@
|
||||
worker_processes 1;
|
||||
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
# 限制body大小
|
||||
client_max_body_size 100m;
|
||||
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
upstream server {
|
||||
ip_hash;
|
||||
server 172.30.0.60:8080;
|
||||
server 172.30.0.61:8080;
|
||||
}
|
||||
|
||||
upstream monitor-admin {
|
||||
server 172.30.0.90:9090;
|
||||
}
|
||||
|
||||
upstream xxljob-admin {
|
||||
server 172.30.0.92:9100;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
# https配置参考 start
|
||||
#listen 443 ssl;
|
||||
|
||||
# 证书直接存放 /docker/nginx/cert/ 目录下即可 更改证书名称即可 无需更改证书路径
|
||||
#ssl on;
|
||||
#ssl_certificate /etc/nginx/cert/xxx.local.crt; # /etc/nginx/cert/ 为docker映射路径 不允许更改
|
||||
#ssl_certificate_key /etc/nginx/cert/xxx.local.key; # /etc/nginx/cert/ 为docker映射路径 不允许更改
|
||||
#ssl_session_timeout 5m;
|
||||
#ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
|
||||
#ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||
#ssl_prefer_server_ciphers on;
|
||||
# https配置参考 end
|
||||
|
||||
# 演示环境配置 拦截除 GET POST 之外的所有请求
|
||||
# if ($request_method !~* GET|POST) {
|
||||
# rewrite ^/(.*)$ /403;
|
||||
# }
|
||||
|
||||
# location = /403 {
|
||||
# default_type application/json;
|
||||
# return 200 '{"msg":"演示模式,不允许操作","code":500}';
|
||||
# }
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
try_files $uri $uri/ /index.html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
location /prod-api/ {
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header REMOTE-HOST $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass http://server/;
|
||||
}
|
||||
|
||||
# https 会拦截内链所有的 http 请求 造成功能无法使用
|
||||
# 解决方案1 将 admin 服务 也配置成 https
|
||||
# 解决方案2 将菜单配置为外链访问 走独立页面 http 访问
|
||||
location /admin/ {
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header REMOTE-HOST $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass http://monitor-admin/admin/;
|
||||
}
|
||||
|
||||
# https 会拦截内链所有的 http 请求 造成功能无法使用
|
||||
# 解决方案1 将 xxljob 服务 也配置成 https
|
||||
# 解决方案2 将菜单配置为外链访问 走独立页面 http 访问
|
||||
location /xxl-job-admin/ {
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header REMOTE-HOST $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass http://xxljob-admin/xxl-job-admin/;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root html;
|
||||
}
|
||||
}
|
||||
}
|
@@ -1 +0,0 @@
|
||||
# requirepass 123456
|
@@ -1,13 +0,0 @@
|
||||
# 基础镜像
|
||||
FROM redis
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi/redis
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi/redis
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi/redis
|
||||
# 复制conf文件到路径
|
||||
COPY ./conf/redis.conf /home/ruoyi/redis/redis.conf
|
28
docker/redis/redis.conf
Normal file
28
docker/redis/redis.conf
Normal file
@@ -0,0 +1,28 @@
|
||||
# redis 密码
|
||||
requirepass ruoyi123
|
||||
|
||||
# key 监听器配置
|
||||
# notify-keyspace-events Ex
|
||||
|
||||
# 配置持久化文件存储路径
|
||||
dir /redis/data
|
||||
# 配置rdb
|
||||
# 15分钟内有至少1个key被更改则进行快照
|
||||
save 900 1
|
||||
# 5分钟内有至少10个key被更改则进行快照
|
||||
save 300 10
|
||||
# 1分钟内有至少10000个key被更改则进行快照
|
||||
save 60 10000
|
||||
# 开启压缩
|
||||
rdbcompression yes
|
||||
# rdb文件名 用默认的即可
|
||||
dbfilename dump.rdb
|
||||
|
||||
# 开启aof
|
||||
appendonly yes
|
||||
# 文件名
|
||||
appendfilename "appendonly.aof"
|
||||
# 持久化策略,no:不同步,everysec:每秒一次,always:总是同步,速度比较慢
|
||||
# appendfsync always
|
||||
appendfsync everysec
|
||||
# appendfsync no
|
@@ -1,15 +0,0 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/ruoyi-auth.jar /home/ruoyi/ruoyi-auth.jar
|
||||
# 启动认证服务
|
||||
ENTRYPOINT ["java","-jar","ruoyi-auth.jar"]
|
@@ -1 +0,0 @@
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤<EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD>jar<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>docker<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD>á<EFBFBD>
|
@@ -1,15 +0,0 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/ruoyi-gateway.jar /home/ruoyi/ruoyi-gateway.jar
|
||||
# 启动网关服务
|
||||
ENTRYPOINT ["java","-jar","ruoyi-gateway.jar"]
|
@@ -1 +0,0 @@
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD>jar<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>docker<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD>á<EFBFBD>
|
@@ -1,15 +0,0 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/ruoyi-modules-file.jar /home/ruoyi/ruoyi-modules-file.jar
|
||||
# 启动文件服务
|
||||
ENTRYPOINT ["java","-jar","ruoyi-modules-file.jar"]
|
@@ -1 +0,0 @@
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD>jar<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>docker<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD>á<EFBFBD>
|
@@ -1,15 +0,0 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/ruoyi-modules-gen.jar /home/ruoyi/ruoyi-modules-gen.jar
|
||||
# 启动代码生成服务
|
||||
ENTRYPOINT ["java","-jar","ruoyi-modules-gen.jar"]
|
@@ -1 +0,0 @@
|
||||
<EFBFBD><EFBFBD><EFBFBD>Ŵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD>jar<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>docker<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD>á<EFBFBD>
|
@@ -1,15 +0,0 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/ruoyi-modules-job.jar /home/ruoyi/ruoyi-modules-job.jar
|
||||
# 启动定时任务服务
|
||||
ENTRYPOINT ["java","-jar","ruoyi-modules-job.jar"]
|
@@ -1 +0,0 @@
|
||||
<EFBFBD><EFBFBD><EFBFBD>Ŷ<EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD>jar<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>docker<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD>á<EFBFBD>
|
@@ -1,15 +0,0 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/ruoyi-modules-system.jar /home/ruoyi/ruoyi-modules-system.jar
|
||||
# 启动系统服务
|
||||
ENTRYPOINT ["java","-jar","ruoyi-modules-system.jar"]
|
@@ -1 +0,0 @@
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳģ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD>jar<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>docker<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD>á<EFBFBD>
|
@@ -1,15 +0,0 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/ruoyi-visual-monitor.jar /home/ruoyi/ruoyi-visual-monitor.jar
|
||||
# 启动系统服务
|
||||
ENTRYPOINT ["java","-jar","ruoyi-visual-monitor.jar"]
|
@@ -1 +0,0 @@
|
||||
<EFBFBD><EFBFBD><EFBFBD>ż<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD>jar<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>docker<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD>á<EFBFBD>
|
Reference in New Issue
Block a user