initial clean deployment

This commit is contained in:
2026-04-26 08:09:15 +08:00
commit 605530fccc
841 changed files with 101888 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
TZ=Asia/Shanghai
UI_PORT=80
APP_PORT=9000
ZZYL_ADMIN_IMAGE=registry.cn-hangzhou.aliyuncs.com/example/zzyl-admin:latest
ZZYL_UI_IMAGE=registry.cn-hangzhou.aliyuncs.com/example/zzyl-ui:latest
MYSQL_PORT=3306
MYSQL_DATABASE=zzyl
MYSQL_ROOT_PASSWORD=change_me_mysql_root
MYSQL_APP_USER=zzyl
MYSQL_APP_PASSWORD=change_me_mysql_app
MYSQL_URL=jdbc:mysql://zzyl-mysql:3306/zzyl?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai
MYSQL_USERNAME=zzyl
MYSQL_PASSWORD=change_me_mysql_app
REDIS_PORT=6379
REDIS_HOST=zzyl-redis
REDIS_PASSWORD=change_me_redis
REDIS_DATABASE=2
APP_LOG_DIR=/data/zzyl/logs
APP_PROFILE_DIR=/data/zzyl/uploadPath
RUOYI_PROFILE=/data/zzyl/uploadPath
TOKEN_SECRET=change_me_token_secret
TOKEN_EXPIRE_TIME=3600
DRUID_LOGIN_USERNAME=ruoyi
DRUID_LOGIN_PASSWORD=change_me_druid
DEPT_NURSING_ID=201
ALIYUN_OSS_DOMAIN=oss-cn-hangzhou.aliyuncs.com
ALIYUN_OSS_ENDPOINT=https://oss-cn-hangzhou.aliyuncs.com
ALIYUN_OSS_BUCKET=change-me-bucket
ALIYUN_OSS_REGION=cn-hangzhou
ALIYUN_OSS_ACCESS_KEY_ID=change_me_oss_key
ALIYUN_OSS_SECRET_ACCESS_KEY=change_me_oss_secret
BAIDU_ACCESS_KEY=change_me_baidu_key
BAIDU_SECRET_KEY=change_me_baidu_secret
BAIDU_QIANFAN_MODEL=ERNIE-4.0-8K
WECHAT_MINI_PROGRAM_APP_ID=change_me_wechat_appid
WECHAT_MINI_PROGRAM_SECRET=change_me_wechat_secret
HUAWEI_CLOUD_AK=change_me_huawei_ak
HUAWEI_CLOUD_SK=change_me_huawei_sk
HUAWEI_CLOUD_REGION_ID=cn-east-3
HUAWEI_CLOUD_ENDPOINT=change_me_huawei_endpoint
HUAWEI_CLOUD_PROJECT_ID=change_me_huawei_project_id
HUAWEI_CLOUD_AMQP_HOST=change_me_huawei_amqp_host
HUAWEI_CLOUD_AMQP_ACCESS_KEY=change_me_huawei_amqp_access_key
HUAWEI_CLOUD_AMQP_ACCESS_CODE=change_me_huawei_amqp_access_code
HUAWEI_CLOUD_AMQP_QUEUE_NAME=DefaultQueue

View File

@@ -0,0 +1,24 @@
services:
zzyl-admin:
image: ${ZZYL_ADMIN_IMAGE}
container_name: zzyl-admin
restart: unless-stopped
env_file:
- .env
environment:
TZ: ${TZ}
SPRING_PROFILES_ACTIVE: prod
ports:
- "${APP_PORT}:9000"
volumes:
- ${APP_LOG_DIR}:/home/ruoyi/logs
- ${APP_PROFILE_DIR}:${APP_PROFILE_DIR}
zzyl-ui:
image: ${ZZYL_UI_IMAGE}
container_name: zzyl-ui
restart: unless-stopped
depends_on:
- zzyl-admin
ports:
- "${UI_PORT}:80"

View File

@@ -0,0 +1,63 @@
services:
mysql:
image: mysql:8.0
container_name: zzyl-mysql
restart: unless-stopped
environment:
TZ: ${TZ}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_USER: ${MYSQL_APP_USER}
MYSQL_PASSWORD: ${MYSQL_APP_PASSWORD}
ports:
- "${MYSQL_PORT}:3306"
command:
- --default-authentication-plugin=mysql_native_password
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_general_ci
volumes:
- mysql_data:/var/lib/mysql
redis:
image: redis:7.2-alpine
container_name: zzyl-redis
restart: unless-stopped
environment:
TZ: ${TZ}
ports:
- "${REDIS_PORT}:6379"
command: >
sh -c "redis-server --appendonly yes --requirepass ${REDIS_PASSWORD}"
volumes:
- redis_data:/data
zzyl-admin:
image: ${ZZYL_ADMIN_IMAGE}
container_name: zzyl-admin
restart: unless-stopped
env_file:
- .env
depends_on:
- mysql
- redis
environment:
TZ: ${TZ}
SPRING_PROFILES_ACTIVE: prod
ports:
- "${APP_PORT}:9000"
volumes:
- ${APP_LOG_DIR}:/home/ruoyi/logs
- ${APP_PROFILE_DIR}:${APP_PROFILE_DIR}
zzyl-ui:
image: ${ZZYL_UI_IMAGE}
container_name: zzyl-ui
restart: unless-stopped
depends_on:
- zzyl-admin
ports:
- "${UI_PORT}:80"
volumes:
mysql_data:
redis_data:

View File

@@ -0,0 +1,46 @@
services:
mysql:
image: mysql:8.0
container_name: zzyl-mysql
restart: unless-stopped
environment:
TZ: ${TZ}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_USER: ${MYSQL_APP_USER}
MYSQL_PASSWORD: ${MYSQL_APP_PASSWORD}
ports:
- "${MYSQL_PORT}:3306"
command:
- --default-authentication-plugin=mysql_native_password
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_general_ci
volumes:
- mysql_data:/var/lib/mysql
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -uroot -p${MYSQL_ROOT_PASSWORD}"]
interval: 10s
timeout: 5s
retries: 10
redis:
image: redis:7.2-alpine
container_name: zzyl-redis
restart: unless-stopped
environment:
TZ: ${TZ}
ports:
- "${REDIS_PORT}:6379"
command: >
sh -c "redis-server --appendonly yes --requirepass ${REDIS_PASSWORD}"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD-SHELL", "redis-cli -a ${REDIS_PASSWORD} ping"]
interval: 10s
timeout: 5s
retries: 10
volumes:
mysql_data:
redis_data:

View File

@@ -0,0 +1,55 @@
ruoyi:
profile: /data/zzyl/uploadPath
spring:
datasource:
druid:
master:
url: jdbc:mysql://zzyl-mysql:3306/zzyl?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai
username: zzyl
password: change_me_mysql_app
statViewServlet:
login-username: ruoyi
login-password: change_me_druid
redis:
host: zzyl-redis
port: 6379
database: 2
password: change_me_redis
token:
secret: change_me_token_secret
expireTime: 3600
aliyun:
oss:
domain: oss-cn-hangzhou.aliyuncs.com
endpoint: https://oss-cn-hangzhou.aliyuncs.com
bucket-name: change-me-bucket
region: cn-hangzhou
accessKeyId: change_me_oss_key
secretAccessKey: change_me_oss_secret
dept:
nursingId: 201
baidu:
accessKey: change_me_baidu_key
secretKey: change_me_baidu_secret
qianfanModel: ERNIE-4.0-8K
wechat:
mini-program:
appId: change_me_wechat_appid
secret: change_me_wechat_secret
huaweicloud:
ak: change_me_huawei_ak
sk: change_me_huawei_sk
regionId: cn-east-3
endpoint: change_me_huawei_endpoint
projectId: change_me_huawei_project_id
host: change_me_huawei_amqp_host
accessKey: change_me_huawei_amqp_access_key
accessCode: change_me_huawei_amqp_access_code
queueName: DefaultQueue

View File

@@ -0,0 +1,26 @@
server {
listen 80;
server_name _;
client_max_body_size 20m;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /prod-api/ {
proxy_pass http://127.0.0.1:9000/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}