fix: keep deployment traffic on ready web

This commit is contained in:
Jesse_Chen
2026-07-20 15:23:24 +08:00
parent 7ef8f7c146
commit 3b81fa9689
4 changed files with 41 additions and 6 deletions
+9 -1
View File
@@ -31,6 +31,13 @@ services:
JYOTISH_API_BASE: http://api:5200
expose:
- "3000"
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:3000/api/health').then(r=>{if(!r.ok)process.exit(1)})"]
interval: 30s
timeout: 5s
retries: 5
start_period: 30s
start_interval: 1s
depends_on:
api:
condition: service_healthy
@@ -49,7 +56,8 @@ services:
- caddy_data:/data
- caddy_config:/config
depends_on:
- web
web:
condition: service_healthy
volumes:
caddy_data: