Skip to content

Instantly share code, notes, and snippets.

@zuzzas
Last active August 29, 2015 14:26
Show Gist options
  • Save zuzzas/43ca28c603a750f5f450 to your computer and use it in GitHub Desktop.
Save zuzzas/43ca28c603a750f5f450 to your computer and use it in GitHub Desktop.
gunicorn systemd unit
[Unit]
Description=gunicorn daemon
After=network.target
[Service]
PIDFile=/var/apps/gunicorn.pid
User=apps
Group=apps
WorkingDirectory=/var/apps/bans
ExecStart=/usr/local/bin/gunicorn --pid /var/apps/gunicorn.pid --bind unix:/var/apps/apps.sock wsgi:app
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s TERM $MAINPID
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment