Use 127.0.0.1 in healthchecks (localhost resolves to ::1 in alpine, nginx/directus listen IPv4 only)

This commit is contained in:
2026-05-03 16:34:27 +00:00
parent 64cd39844e
commit 522e3e476b
+2 -2
View File
@@ -268,7 +268,7 @@ services:
# Single backend service shared by all three routers above. # Single backend service shared by all three routers above.
- "traefik.http.services.trm-directus.loadbalancer.server.port=8055" - "traefik.http.services.trm-directus.loadbalancer.server.port=8055"
healthcheck: healthcheck:
test: ['CMD-SHELL', 'wget -qO- http://localhost:8055/server/health || exit 1'] test: ['CMD-SHELL', 'wget -qO- http://127.0.0.1:8055/server/health || exit 1']
interval: 30s interval: 30s
timeout: 10s timeout: 10s
# First boot includes Directus's internal migrations (~3045 s on # First boot includes Directus's internal migrations (~3045 s on
@@ -315,7 +315,7 @@ services:
- "traefik.http.routers.trm-spa.tls.certresolver=le" - "traefik.http.routers.trm-spa.tls.certresolver=le"
- "traefik.http.services.trm-spa.loadbalancer.server.port=80" - "traefik.http.services.trm-spa.loadbalancer.server.port=80"
healthcheck: healthcheck:
test: ['CMD-SHELL', 'wget -qO- http://localhost/ || exit 1'] test: ['CMD-SHELL', 'wget -qO- http://127.0.0.1/ || exit 1']
interval: 30s interval: 30s
timeout: 5s timeout: 5s
start_period: 5s start_period: 5s