Skip to content

Instantly share code, notes, and snippets.

@mazhar266
Created August 6, 2018 08:10
Show Gist options
  • Save mazhar266/63fbf35032720cc5dd318ca9a0f4e98b to your computer and use it in GitHub Desktop.
Save mazhar266/63fbf35032720cc5dd318ca9a0f4e98b to your computer and use it in GitHub Desktop.
Manage Gunicorn with systemd on Ubuntu 16.04 and venv
[Unit]
Description=gunicorn daemon
After=network.target
[Service]
User=sammy
Group=www-data
WorkingDirectory=/home/sammy/myproject
ExecStart=/home/sammy/myproject/myprojectenv/bin/gunicorn --access-logfile - --workers 3 --bind unix:/home/sammy/myproject/myproject.sock myproject.wsgi:application
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment