Feat: import supervisor.conf environment variables from site configΒ #1581
Description
Issue: Feature Request
Is your feature request related to a problem? Please describe.
There doesn't currently seem to be a way of importing environment variables into gunicorn and workers using the supervisor environment=
feature. This would be useful for dependencies that look at os.environ, etc
Describe the solution you'd like
Modify bench setup supervisor
to import this config from site_config.json
, maybe a key called environment
Describe alternatives you've considered
There doesn't appear to be any other way of passing environment variables to gunicorn
I looked at dotenv
but seems overkill to include another dependency
Additional context
https://stackoverflow.com/questions/12900402/supervisor-and-environment-variables
bench/bench/config/supervisor.py
Line 25 in bb2e324