Skip to content

Instantly share code, notes, and snippets.

@simensen
Created November 14, 2012 23:15
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 simensen/09b1f607c6a5955164d3 to your computer and use it in GitHub Desktop.
Save simensen/09b1f607c6a5955164d3 to your computer and use it in GitHub Desktop.
description "Uploader Django instance"
start on runlevel [2345]
stop on runlevel [!2345]
env HOME=/home/uploader
env LOGDIR=/opt/uploader/share/logs
env LOGFILE=$LOGDIR/gunicorn.log
# We must be in the project directory
chdir /opt/uploader/current
pre-start script
test -d $LOGDIR || ( mkdir -p $LOGDIR && chown uploader.uploader $LOGDIR)
end script
exec /opt/uploader/current/ve/bin/gunicorn -w 3 -b 0.0.0.0:996 -u uploader -g uploader --log-level=debug --log-file=$LOGFILE um.wsgi 2>>$LOGFILE.stderr
respawn
respawn limit 10 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment