优化启动流程

This commit is contained in:
yml2213
2026-04-13 19:01:48 +08:00
parent 7008c85e58
commit dc8a014601
18 changed files with 837 additions and 17 deletions
+8 -1
View File
@@ -25,6 +25,12 @@ services:
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://127.0.0.1:3000/health/ready || exit 1"]
interval: 5s
timeout: 5s
retries: 20
start_period: 20s
environment:
TZ: ${TZ:-Asia/Shanghai}
PORT: ${BACKEND_PORT:-3000}
@@ -57,7 +63,8 @@ services:
APP_DOMAIN: ${APP_DOMAIN:-localhost}
restart: unless-stopped
depends_on:
- backend
backend:
condition: service_healthy
ports:
- "80:80"
- "443:443"