This commit is contained in:
2026-01-29 17:10:20 +01:00
parent ac0401a6a5
commit 08d6d7ceb2
5 changed files with 15 additions and 5 deletions

View File

@@ -14,5 +14,7 @@ COPY . .
EXPOSE 5000
# Keep testing and local dev via `flask` if desired; docker runs the app directly.
CMD ["python", "app.py"]
# Use Gunicorn (production WSGI server) in Docker.
# We keep the container compatible with the PORT env var used in docker-compose.
# JSON-form CMD doesn't expand env vars, so we use a shell form here.
CMD ["sh", "-c", "gunicorn --bind 0.0.0.0:${PORT:-5000} --workers 2 --threads 4 app:app"]