diff --git a/Dockerfile b/Dockerfile index 12b388c..814d663 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,5 +45,6 @@ HEALTHCHECK --interval=60s --timeout=3s --start-period=5s --retries=3 \ CMD python -c "import os, urllib.request; urllib.request.urlopen(f'http://localhost:{os.getenv(\"PORT\", \"8000\")}/health')" # Run the application (shell form to allow environment variable expansion) -CMD uvicorn backend.main:app --host 0.0.0.0 --port $PORT --timeout-graceful-shutdown 2 +# Use exec to replace shell with uvicorn (receives SIGTERM directly for graceful shutdown) +CMD exec uvicorn backend.main:app --host 0.0.0.0 --port $PORT --timeout-graceful-shutdown 2