This required setting the following in my /etc/environment:
Here’s my mod_wsgi configuration for a flask app that uses Flask-Admin.
Trailing slashes matter! If you set a trailing slash, it will only set the alias for that directory and not all of the directories below it. If you make configuration changes, the changes will not take effect until you:
- supervisorctl reread
- supervisorctl update
"redirect_stderr=true" will cause both stderr and stdout to appear in the "stdout" log.
You get to select which user runs the command with the "user" parameter.
For example: user=rootSupervisord keeps its own set of environmental variables with the "environment" parameter. It won't pick up env variables from /etc/environment.
For example: environment=A="1",B="2"For Gunicorn, use a configuration file rather than putting all your arguments into the "command" parameter.
For example, -t will be ignored here:
command=/path/to/gunicorn main:application -t 300
command=/path/to/gunicorn main:application -c /path/to/gunicorn.conf.py