oxdata/nginx/oxdata.conf
2016-03-06 16:05:46 +05:30

30 lines
750 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 -- \
wsgi:application \
--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