oxdata/nginx/oxdata.conf
2013-08-26 15:56:36 +02:00

29 lines
732 B
Text

# oxdata gunicorn daemon
#
description "oxdata daemon"
start on runlevel [2345]
stop on runlevel [!2345]
kill timeout 5
respawn
env VENV=/srv/oxdata
env USER=oxdata
env HOME=/home/oxdata
pre-start script
test -e /var/log/oxdata || (mkdir -p /var/log/oxdata && chown $USER:$USER /var/log/oxdata)
test -e /var/run/oxdata || (mkdir -p /var/run/oxdata && chown $USER:$USER /var/run/oxdata)
end script
exec start-stop-daemon \
--pidfile /var/run/oxdata/oxdata.pid \
--start -c $USER -d $VENV/oxdata \
--exec $VENV/bin/gunicorn_django -- \
--bind 127.0.0.1:8087 \
--workers 5 \
--max-requests 1000 \
--log-file /var/log/oxdata/oxdata.log \
--pidfile /var/run/oxdata/oxdata.pid \
--log-level info