Skip to content

Feat: import supervisor.conf environment variables from site configΒ #1581

Open
@casesolved-co-uk

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

def generate_supervisor_config(bench_path, user=None, yes=False, skip_redis=False):

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions