Skip to content

Instantly share code, notes, and snippets.

@lukecampbell
Created November 18, 2015 15:41
Show Gist options
  • Save lukecampbell/632318f48b90eb231b91 to your computer and use it in GitHub Desktop.
Save lukecampbell/632318f48b90eb231b91 to your computer and use it in GitHub Desktop.
Systemd for Supervisor with Virtualenv
[Unit]
Description=supervisord - Supervisor process control system for UNIX
Documentation=http://supervisord.org
After=network.target
[Service]
Type=forking
User=dev
ExecStart=/bin/bash -c 'cd /home/dev/code; source /home/dev/.virtualenvs/comt/bin/activate; /home/dev/.virtualenvs/comt/bin/supervisord -c /home/dev/code/supervisord.conf'
ExecReload=/bin/bash -c 'source /home/dev/.virtualenvs/comt/bin/activate; /home/dev/.virtualenvs/comt/bin/supervisorctl -c /home/dev/code/supervisord.conf reload '
ExecReload=/bin/bash -c 'source /home/dev/.virtualenvs/comt/bin/activate; /home/dev/.virtualenvs/comt/bin/supervisorctl -c /home/dev/code/supervisord.conf shutdown '
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment