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"]