Created
November 13, 2018 06:34
-
-
Save yiidtw/68cfcf973bd08379eb7d87b9880bf3bc to your computer and use it in GitHub Desktop.
example of a systemd service file running a python + flask + gunicorn application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Gunicorn instance to serve python-flask | |
After=network.target | |
[Service] | |
User=centos | |
Group=centos | |
WorkingDirectory=/home/centos/python-flask | |
Environment="PATH=/home/centos/miniconda2/envs/python-flask/bin" | |
ExecStart=/home/centos/miniconda2/envs/python-flask/bin/gunicorn --bind 0.0.0.0:8000 wsgi | |
# ExecStart=/home/centos/miniconda2/envs/python-flask/bin/gunicorn --workers 2 --bind unix:api.sock -m 007 wsgi | |
# https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-gunicorn-and-nginx-on-centos-7 | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment