Add HEALTHCHECK to Dockerfile using python3 urllib

Coolify requires curl/wget for HTTP healthchecks on Dockerfile deployments,
but the python:3.12-slim image doesn't include them. Use python3 urllib instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-24 20:11:45 +00:00
parent 39089dcef5
commit de3df6c7a9

View File

@@ -23,4 +23,7 @@ ENV DOTENV_PATH=/home/chaim/.env
EXPOSE 8080
HEALTHCHECK --interval=5s --timeout=5s --start-period=10s --retries=10 \
CMD python3 -c "import urllib.request; urllib.request.urlopen('http://localhost:8080/')" || exit 1
CMD ["uvicorn", "web.app:app", "--host", "0.0.0.0", "--port", "8080"]