You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current Docker image (via bin/start.sh) starts the Flask development server.
This has been fine as we've only been using the server for testing. As we move to deploy the server for Courtesy Cards, we'll want to run Flask using production best-practices.
We're going to end up with a Dockerfile here that has a lot of crossover with benefits, at least the commands for installing/configuring nginx and gunicorn:
Let's create another repository that builds and publishes a common base image for Python + gunicorn + nginx.
This would provide an image to reference like ghcr.io/cal-itp/<image>:<tag>. Both of eligibility-server and benefits could base their app images on this new image and simplify the common setup and configuration (and build times).
The current Docker image (via
bin/start.sh
) starts the Flask development server.This has been fine as we've only been using the server for testing. As we move to deploy the server for Courtesy Cards, we'll want to run Flask using production best-practices.
See more at: Flask - Deploying to Production.
In general, we can follow a similar pattern as in
benefits
:nginx
is the reverse proxy that accepts traffic coming into the container, and routes app traffic alonggunicorn
is the WSGI application server, receiving app traffic fromnginx
and forwarding to the app (Flask)bin/start.sh
starts the production setupThe text was updated successfully, but these errors were encountered: