feat(docker): swap Flask dev server for gunicorn in api and web images

This commit is contained in:
yiekheng 2026-05-02 17:38:01 +08:00
parent 231ae69eef
commit 1d4ecadfaa
2 changed files with 4 additions and 4 deletions

View File

@ -16,5 +16,5 @@ ENV PYTHONUNBUFFERED=1
# Expose port # Expose port
EXPOSE 3000 EXPOSE 3000
# Run the API server # Run the API server with gunicorn (Flask dev server is for the dev override).
CMD ["python", "-m", "app.cm_api"] CMD ["gunicorn", "--workers", "2", "--timeout", "30", "--bind", "0.0.0.0:3000", "app.cm_api:create_app()"]

View File

@ -16,5 +16,5 @@ ENV PYTHONUNBUFFERED=1
# Expose port # Expose port
EXPOSE 8000 EXPOSE 8000
# Run the web view # Run the web view with gunicorn (Flask dev server is for the dev override).
CMD ["python", "-m", "app.cm_web_view"] CMD ["gunicorn", "--workers", "2", "--timeout", "30", "--bind", "0.0.0.0:8000", "app.cm_web_view:app"]