优化启动流程
This commit is contained in:
+10
-2
@@ -32,6 +32,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}
|
||||
@@ -81,8 +87,10 @@ services:
|
||||
dockerfile: deploy/docker/dev-caddy.Dockerfile
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- backend
|
||||
- frontend
|
||||
backend:
|
||||
condition: service_healthy
|
||||
frontend:
|
||||
condition: service_started
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
|
||||
Reference in New Issue
Block a user