fix: 添加容器日志轮转配置和 Worker 健康检查
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled

This commit is contained in:
2026-07-02 17:20:13 +08:00
parent 8395f2a219
commit c9f95ed5a6
+25 -2
View File
@@ -23,6 +23,15 @@
# - 确保 xiaoxia-net 网络已创建: docker network create xiaoxia-net
#
# ===========================================
# 日志轮转配置(所有服务共享)
# ===========================================
x-logging: &default-logging
driver: json-file
options:
max-size: "50m"
max-file: "3"
services:
# =========================================
# API 服务
@@ -69,6 +78,8 @@ services:
retries: 3
start_period: 40s
logging: *default-logging
# =========================================
# 资源限制建议(生产环境建议启用)
# =========================================
@@ -107,7 +118,17 @@ services:
networks:
- xiaoxia-net
# 健康检查配置
healthcheck:
test: ["CMD-SHELL", "celery -A app.celery_app inspect ping --timeout 5 || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
logging: *default-logging
# =========================================
# 资源限制建议(生产环境建议启用)
# =========================================
@@ -155,7 +176,9 @@ services:
interval: 30s
timeout: 5s
retries: 3
logging: *default-logging
# =========================================
# 资源限制建议
# =========================================