Skip to content

Instantly share code, notes, and snippets.

@vorushin
Created November 7, 2011 13:23
Show Gist options
  • Save vorushin/1344938 to your computer and use it in GitHub Desktop.
Save vorushin/1344938 to your computer and use it in GitHub Desktop.
Example of gunicorn.conf upstart config file
description "Gunicorn for answers"
start on runlevel [2345]
stop on runlevel [!2345]
kill timeout 5
respawn
env VENV="/home/django/answers/env"
env LOG="/home/django/log/answers.log"
env PID="/home/django/run/answers.pid"
env SETTINGS="/home/django/answers/settings.py"
env PORT="8100"
script
exec sudo -u django $VENV/bin/gunicorn_django --preload -w 4 -t 60 --log-level debug --log-file $LOG -p $PID -b 127.0.0.1:$PORT $SETTINGS
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment