Skip to content

Instantly share code, notes, and snippets.

@Jamp
Created June 24, 2017 23:29
Show Gist options
  • Save Jamp/ea41d89f744fed2753af66f0d2ee614b to your computer and use it in GitHub Desktop.
Save Jamp/ea41d89f744fed2753af66f0d2ee614b to your computer and use it in GitHub Desktop.
Gunicorn Systemd Config
[Unit]
Description=gunicorn daemon
After=network.target
After=syslog.target
[Service]
User=nginx
Group=nginx
EnvironmentFile=/etc/api.gunicorn
WorkingDirectory=/var/webapps/api
ExecStart=/var/webapps/api/bin/gunicorn --workers 5 --bind unix:///var/webapps/api/api.sock api.wsgi:application --access-logfile /var/webapps/api/log/access.log --error-logfile /var/webapps/api/log/error.log
Restart=on-failure
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment