Flask not reading environment variables with supervisor, gunicorn and nginx

血红的双手。 提交于 2019-12-23 22:00:22

问题


I'm trying to deploy a flask app to my Cent OS server but I think it can't read the environment variables that are being set by supervisor.

Here's my supervisor conf for the flask app

[program:philms]
environment=PHILMS_SECRET="supersecretkey",PHILMS_API_SECRET="shmickles"
command = gunicorn philms.app:create_app\(\) -b 0.0.0.0:5000
directory = /sites/philms
user = wilson

I've tried setting the variables in my .bashrc but that didn't work. And I can't see anything wrong with my supervisor conf.

来源:https://stackoverflow.com/questions/34704891/flask-not-reading-environment-variables-with-supervisor-gunicorn-and-nginx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!