Make nginx healthcheck deterministic (was flapping to unhealthy)
All checks were successful
Build and Push Docker Images / build-and-push (push) Successful in 8s
All checks were successful
Build and Push Docker Images / build-and-push (push) Successful in 8s
BusyBox wget --spider on nginx:alpine flaps and 'localhost' may resolve to IPv6 first, marking the container unhealthy while it serves fine. Use an explicit 127.0.0.1 fetch-and-discard with more retries. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
46ae6ff5fe
commit
f0ee1289e1
1 changed files with 6 additions and 3 deletions
|
|
@ -18,12 +18,15 @@ services:
|
|||
networks:
|
||||
- etsy-network
|
||||
- traefik_default
|
||||
# Use an explicit IPv4 fetch-and-discard; BusyBox wget --spider flaps on
|
||||
# nginx:alpine and 'localhost' can resolve to IPv6 first, causing false
|
||||
# "unhealthy" even though nginx is serving fine.
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost/"]
|
||||
test: ["CMD-SHELL", "wget -q -O /dev/null http://127.0.0.1/ || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
retries: 5
|
||||
start_period: 20s
|
||||
|
||||
# Etsy Finance Tracker API Server (from GitHub Container Registry)
|
||||
etsy-tracker:
|
||||
|
|
|
|||
Loading…
Reference in a new issue