Skip to content

Instantly share code, notes, and snippets.

@twyle
Created June 6, 2022 07:05
Show Gist options
  • Save twyle/be28ed214b183ec08f61c4e3fe7b1de0 to your computer and use it in GitHub Desktop.
Save twyle/be28ed214b183ec08f61c4e3fe7b1de0 to your computer and use it in GitHub Desktop.
[Unit]
Description=Gunicorn instance to serve the api
After=network.target
[Service]
User=lyle
Group=lyle
WorkingDirectory=/home/lyle/flask-ec2-deployment
Environment="PATH=/home/lyle/flask-ec2-deployment/venv/bin"
EnvironmentFile=/home/lyle/.env
ExecStart=/home/lyle/flask-ec2-deployment/venv/bin/gunicorn --workers 4 --bind 0.0.0.0:5000 main:app
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment