简体   繁体   中英

Not able to access gunicorn env file for python deployment in linux

I am trying to deploy python app in my centos7 using flask and gunicorn. but i found that the app is not able to retrive variables from.env file.

It is working on my local vm. I am using gunicorn --bind 0.0.0.0:5000 app:app

pls help.

So, just configure a service file app.service in /etc/systemd/system and add EnvironmentFile=/path_to_env_file under [service] and start the service.

For more info on configuring the env file in gunicorn service, you can see here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM