'Can't access environment variable in django that set in the supervisor conf file
[program:program_name]
command={gunicorn-path}
directory={path}
user={user}
autostart=true
autorestart=true
redirect_stderr=true
stderr_logfile=api_error.log
stdout_logfile=api_out.log
environment=ENV=my_env
I use the above supervisor.conf file to set the environment for my Django,
ENVIRONMENT = os.environ.get('ENV')
this way I try to access the env
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
