Skip to content

Instantly share code, notes, and snippets.

@deliro
Created July 19, 2016 16:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deliro/fd2a504a56da441b358c0300be4f83b8 to your computer and use it in GitHub Desktop.
Save deliro/fd2a504a56da441b358c0300be4f83b8 to your computer and use it in GitHub Desktop.
Create systemd service
[Unit]
Description=gunicorn daemon
After=network.target
[Service]
User=sammy
Group=www-data
WorkingDirectory=/home/sammy/myproject
ExecStart=/home/sammy/myproject/myprojectenv/bin/gunicorn --workers 3 --bind unix:/home/sammy/myproject/myproject.sock myproject.wsgi:application
[Install]
WantedBy=multi-user.target
# sudo systemctl start gunicorn
# sudo systemctl enable gunicorn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment