feat: youhua
Some checks failed
Build and Deploy / deploy (push) Has been cancelled

This commit is contained in:
2026-03-21 21:05:33 +08:00
parent 4f3de2b78f
commit b2fc8eafa6
3 changed files with 306 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
# 生产环境 Docker Compose 配置
# 注意:数据库和 Redis 使用外部服务,不在此文件中定义
# 前端静态文件由 Nginx 直接托管,不使用 Docker
version: "3.8"
name: sionrui-prod
services:
# 后端服务
backend:
container_name: sionrui-backend
build:
context: ../../
dockerfile: yudao-server/Dockerfile
image: sionrui-backend:latest
restart: always
ports:
- "9900:9900"
environment:
- TZ=Asia/Shanghai
- SPRING_PROFILES_ACTIVE=prod
- JAVA_OPTS=-Xms1g -Xmx1g -XX:+HeapDumpOnOutOfMemoryError
volumes:
- /www/wwwroot/yudao-server/logs:/app/logs
- /www/wwwroot/yudao-server/heapError:/app/heapError
- /www/wwwroot/yudao-server/config:/app/config
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9900/actuator/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "3"