fix: nginx waits for estore healthcheck before starting
Nginx resolves upstream hostnames at boot time; if estore isn't registered in Docker DNS yet it crashes in a restart loop. Using service_healthy lets nginx wait until the Next.js app passes its healthcheck before nginx attempts to start. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
57cc5840b9
commit
e2af78ff55
@ -9,8 +9,10 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||||
depends_on:
|
depends_on:
|
||||||
- main-site
|
main-site:
|
||||||
- estore
|
condition: service_started
|
||||||
|
estore:
|
||||||
|
condition: service_healthy
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
# ── Main website ─────────────────────────────────────────────────────────────
|
# ── Main website ─────────────────────────────────────────────────────────────
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user