fix: use 127.0.0.1 instead of localhost in healthcheck (IPv6 resolution issue)

This commit is contained in:
2026-02-27 12:53:23 -06:00
parent bac60a2d8d
commit d41068ccec
2 changed files with 2 additions and 2 deletions

View File

@@ -11,4 +11,4 @@ RUN sed -i '/location \/ {/a\ try_files $uri $uri/ /index.html;' /etc/ngi
COPY --from=build /app/dist /usr/share/nginx/html COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 3000 EXPOSE 3000
HEALTHCHECK --interval=60s --timeout=10s --retries=3 \ HEALTHCHECK --interval=60s --timeout=10s --retries=3 \
CMD wget -qO- http://localhost:3000/ || exit 1 CMD wget -qO- http://127.0.0.1:3000/ || exit 1

View File

@@ -7,7 +7,7 @@ services:
ports: ports:
- "${HOST_PORT:-3000}:3000" - "${HOST_PORT:-3000}:3000"
healthcheck: healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3000/"] test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3000/"]
interval: 60s interval: 60s
timeout: 10s timeout: 10s
retries: 3 retries: 3