fix(docker): healthcheck usar 127.0.0.1 para hosts com IPv6 (#44)

Containers em hosts com IPv6 habilitado tentavam conectar via ::1
e falhavam por timeout antes de cair no fallback IPv4. Fixar
127.0.0.1 elimina a ambiguidade.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Felipe Coutinho
2026-04-25 14:46:18 +00:00
parent 7f07a9cbf6
commit f15a003cef
2 changed files with 2 additions and 2 deletions

View File

@@ -109,7 +109,7 @@ USER nextjs
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
CMD wget --quiet --tries=1 --spider http://localhost:3000/api/health || exit 1
CMD wget --quiet --tries=1 --spider http://127.0.0.1:3000/api/health || exit 1
# Entrypoint: roda migrations e depois executa o CMD
ENTRYPOINT ["/app/docker-entrypoint.sh"]

View File

@@ -41,7 +41,7 @@ services:
condition: service_healthy
required: false
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/api/health"]
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://127.0.0.1:3000/api/health"]
interval: 30s
timeout: 10s
retries: 3