A base Dockerfile for python web apps hosted with gunicorn.
This Dockerfile is meant to be used as a base for an applications Dockerfile.
The application Dockerfile should install the applications dependencies globally, create the application in /home/app (readable by the user app) and then setup some configuration environment variables.
An example application & Dockerfile can be found in the example folder of the github repository.
The avaliable configuration variables are:
- APP_NAME - This is required, and should be the
string of the WSGI application to start, as passed to gunicorn. The module
path may use python dotted notation.
- APP_DIR - The directory the app is installed in. APP_NAME should be relative
to this directory. This defaults ot
- NUM_WORKERS - The number of workers to instruct gunicorn to start. This
defaults to 4.