Skip to content

Commit 8dd2be3

Browse files
committed
fix: update HEALTHCHECK command to use curl for improved reliability
1 parent c8fbfe1 commit 8dd2be3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ ENV FRONTEND_DIST_DIR=/app/frontend-dist \
2727
INTERCEPTER_MAX_REQUESTS=100 \
2828
INTERCEPTER_RETENTION_SECONDS=86400
2929
EXPOSE 8181
30+
3031
HEALTHCHECK --interval=10s --timeout=3s --start-period=10s --retries=3 \
31-
CMD python -c "import sys,urllib.request; \
32-
u=urllib.request.urlopen('http://127.0.0.1:8181/healthz'); \
33-
sys.exit(0 if u.getcode()==200 else 1)" || exit 1
32+
CMD curl -fsS http://127.0.0.1:8181/healthz || exit 1
33+
3434
CMD ["python", "-m", "uvicorn", "backend.app.main:app", "--host", "0.0.0.0", "--port", "8181"]

0 commit comments

Comments
 (0)