Created
May 13, 2011 08:07
-
-
Save j4mie/970181 to your computer and use it in GitHub Desktop.
upstart configuration for gunicorn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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' |
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
Paths are (obviously) anonymised - put your logfile and pidfile in sensible places.