Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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