Fix healthcheck to respect PORT environment variable (#330)

* Initial plan

* Fix healthcheck to respect PORT environment variable

Co-authored-by: ThePhaseless <33990351+ThePhaseless@users.noreply.github.com>

* Remove explanatory comment from Dockerfile HEALTHCHECK

Co-authored-by: ThePhaseless <33990351+ThePhaseless@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ThePhaseless <33990351+ThePhaseless@users.noreply.github.com>
This commit is contained in:
Copilot
2026-03-10 21:46:31 +01:00
committed by GitHub
co-authored by ThePhaseless
parent 353eb53280
commit 27040fdad9
+4 -3
View File
@@ -17,7 +17,8 @@ ENV GITHUB_BUILD=${GITHUB_BUILD}\
# prevents python creating .pyc files
PYTHONDONTWRITEBYTECODE=1 \
UV_LINK_MODE=copy \
UV_CACHE_DIR=${UV_CACHE_DIR}
UV_CACHE_DIR=${UV_CACHE_DIR} \
PORT=8191
RUN apt update &&\
apt -y upgrade &&\
@@ -52,6 +53,6 @@ RUN \
uv run pytest --retries 3
FROM app
EXPOSE 8191
HEALTHCHECK --interval=15m --timeout=30s --start-period=5s --retries=3 CMD [ "curl", "http://localhost:8191/health" ]
EXPOSE $PORT
HEALTHCHECK --interval=15m --timeout=30s --start-period=5s --retries=3 CMD curl "http://localhost:${PORT}/health"
ENTRYPOINT ["uv", "run", "main.py"]