fix(deploy): 加固 Redis 持久化与旧环境启动配置
Test deployment public URL (Linux) / test-linux (push) Canceled after 0s
Test start.ps1 (Windows) / test-windows (push) Canceled after 0s

This commit is contained in:
2026-09-23 16:20:55 +08:00
parent 26b1cdcdc6
commit 74ada0b0bf
18 changed files with 405 additions and 15 deletions
+12 -3
View File
@@ -62,9 +62,12 @@ services:
ipv4_address: 172.21.0.6
sandbox-network:
depends_on:
- mongo
- redis
- rabbitmq
mongo:
condition: service_started
redis:
condition: service_healthy
rabbitmq:
condition: service_started
volumes:
- ./data/upload:/app/upload
- ./data/backups:/app/backups
@@ -233,6 +236,12 @@ services:
- ./data/redis:/data # 持久化 Redis AOF/RDB,避免落到容器写层
command: [ "redis-server", "/etc/redis/redis.conf" ] # 让 Redis 读取配置文件
stop_grace_period: 1m # 给 Redis 足够时间在 SIGTERM 后完成 AOF fsync
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 3
start_period: 5s
mem_limit: 2g
memswap_limit: 2g
# ports: