Skip to content

Instantly share code, notes, and snippets.

@j4mie
Created May 13, 2011 08:07
Show Gist options
  • Save j4mie/970181 to your computer and use it in GitHub Desktop.
Save j4mie/970181 to your computer and use it in GitHub Desktop.
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'
@xvaldetaro
Copy link

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