fix(docker): use IPv4 loopback in HEALTHCHECK to support IPv6-enabled networks

On IPv6-enabled Docker networks, 'localhost' resolves to ::1 first,
but uvicorn binds to 0.0.0.0 by default, so the healthcheck can fail.
Using 127.0.0.1 avoids the IPv6/IPv4 mismatch.

Fixes #346
This commit is contained in:
ThePhaseless
2026-07-04 18:06:31 +02:00
parent 8c3e7a9fe4
commit 885a24cf16
+1 -1
View File
@@ -59,5 +59,5 @@ RUN \
FROM app
USER 1000
EXPOSE $PORT
HEALTHCHECK --interval=15m --timeout=30s --start-period=5s --retries=3 CMD curl "http://localhost:${PORT}/health"
HEALTHCHECK --interval=15m --timeout=30s --start-period=5s --retries=3 CMD curl "http://127.0.0.1:${PORT}/health"
ENTRYPOINT ["tini", "--", "/app/.venv/bin/python", "main.py"]