mirror of
https://github.com/ThePhaseless/Byparr.git
synced 2026-09-24 14:20:08 +01:00
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:
+1
-1
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user