diff --git a/Dockerfile b/Dockerfile index 144731b..c4a08f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,6 +41,6 @@ ENV PYTHONUNBUFFERED=1 EXPOSE 8000 ENV PORT=8000 HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 \ - CMD python -c "from urllib.request import urlopen; urlopen('http://127.0.0.1:8000/health', timeout=3).close()" || exit 1 + CMD python -c "import os; from urllib.request import urlopen; urlopen('http://127.0.0.1:'+os.getenv('PORT','8000')+'/health', timeout=3).close()" || exit 1 CMD ["sh", "-c", "exec uvicorn main:app --app-dir src/api --host 0.0.0.0 --port ${PORT:-8000} --proxy-headers"]