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:
chris 2026-05-08 10:36:04 -04:00
parent 57cc5840b9
commit e2af78ff55

View File

@ -9,8 +9,10 @@ services:
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- main-site
- estore
main-site:
condition: service_started
estore:
condition: service_healthy
restart: always
# ── Main website ─────────────────────────────────────────────────────────────