Skip to content

Instantly share code, notes, and snippets.

@blackrobot
Forked from DavidWittman/gunicorn-upstart.conf.template
Last active December 17, 2015 15:28
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 blackrobot/5631575 to your computer and use it in GitHub Desktop.
Save blackrobot/5631575 to your computer and use it in GitHub Desktop.
# This runs gunicorn-django for example.com; to install:
# * sudo ln -s <this file> /etc/init/example_com
# * sudo initctl reload-configuration
# to use:
# * sudo start/stop/restart/reload/status example_com
description "example.com gunicorn instance"
start on runlevel [2345]
stop on runlevel [06]
expect daemon
respawn
respawn limit 10 5
script
BASE="/var/www/example.com"
GUNICORN="${BASE}/env/bin/gunicorn"
CONFIG="${BASE}/app/deploy/gunicorn/example.py"
cd "${BASE}/app/source"
exec $GUNICORN -c $CONFIG wsgi:application
end script
# vim: set et sw=4 ts=4 sts=4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment