Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
upstart configuration for gunicorn
description "upstart configuration for gunicorn"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
exec /home/jamie/.virtualenvs/projectname/bin/gunicorn_django -c /home/jamie/code/projectname/gunicorn.py /home/jamie/code/projectname/settings/production.py
# gunicorn config file
pidfile = '/tmp/gunicorn_projectname.pid'
debug = True
proc_name = 'projectname' # requires setproctitle module to be installed
workers = 2
bind = '0.0.0.0:8001'
logfile = '/home/jamie/code/projectname/gunicorn.log'
loglevel = 'debug'
Owner

j4mie commented May 13, 2011

Paths are (obviously) anonymised - put your logfile and pidfile in sensible places.

How about adding setuid to your user? Upstart runs as root by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment