infra: self-heal nginx after unordered stack restarts
A concurrent restart (docker compose restart / Docker Desktop) can start nginx before the backend's DNS entry exists; "host not found in upstream" is fatal at config load and left the gateway dead (502s). restart: unless-stopped retries until dependencies are up. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BFRyKxkKEjfAgpXygzoNiD
This commit is contained in:
parent
71e39c7e88
commit
55825662d7
1 changed files with 4 additions and 0 deletions
|
|
@ -137,6 +137,10 @@ services:
|
|||
|
||||
nginx:
|
||||
image: nginx:1.27-alpine
|
||||
# Restart on failure: a concurrent stack restart can start nginx before the
|
||||
# backend's DNS entry exists ("host not found in upstream"), which is fatal
|
||||
# at config load — retrying once dependencies are up self-heals the gateway.
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./infra/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
depends_on:
|
||||
|
|
|
|||
Loading…
Reference in a new issue