From 1d4ecadfaae4523676d0edb09431d484e1a09957 Mon Sep 17 00:00:00 2001 From: yiekheng Date: Sat, 2 May 2026 17:38:01 +0800 Subject: [PATCH] feat(docker): swap Flask dev server for gunicorn in api and web images --- docker/api/Dockerfile | 4 ++-- docker/web/Dockerfile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/api/Dockerfile b/docker/api/Dockerfile index 9b4b209..7d0c9dd 100644 --- a/docker/api/Dockerfile +++ b/docker/api/Dockerfile @@ -16,5 +16,5 @@ ENV PYTHONUNBUFFERED=1 # Expose port EXPOSE 3000 -# Run the API server -CMD ["python", "-m", "app.cm_api"] +# Run the API server with gunicorn (Flask dev server is for the dev override). +CMD ["gunicorn", "--workers", "2", "--timeout", "30", "--bind", "0.0.0.0:3000", "app.cm_api:create_app()"] diff --git a/docker/web/Dockerfile b/docker/web/Dockerfile index 9234f9b..93f7ea7 100644 --- a/docker/web/Dockerfile +++ b/docker/web/Dockerfile @@ -16,5 +16,5 @@ ENV PYTHONUNBUFFERED=1 # Expose port EXPOSE 8000 -# Run the web view -CMD ["python", "-m", "app.cm_web_view"] +# Run the web view with gunicorn (Flask dev server is for the dev override). +CMD ["gunicorn", "--workers", "2", "--timeout", "30", "--bind", "0.0.0.0:8000", "app.cm_web_view:app"]