Fix health check IPv6 issue: use 127.0.0.1 instead of localhost

This commit is contained in:
2026-02-27 16:22:16 +01:00
parent fc8b0cc2ea
commit a3d129f6a6
2 changed files with 2 additions and 2 deletions

View File

@@ -28,7 +28,7 @@ EXPOSE 3000
# Healthcheck # Healthcheck
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:3000/health || exit 1 CMD wget -q --spider http://127.0.0.1:3000/health || exit 1
# Starten # Starten
CMD ["node", "dist/index.js"] CMD ["node", "dist/index.js"]

View File

@@ -11,7 +11,7 @@ services:
- LOG_LEVEL=info - LOG_LEVEL=info
restart: unless-stopped restart: unless-stopped
healthcheck: healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/health"] test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1:3000/health"]
interval: 30s interval: 30s
timeout: 3s timeout: 3s
retries: 3 retries: 3