blob: fc6325f598c912dfe6ad9e4142a408d9b2c640fd [file] [log] [blame]
#!/bin/ash
export SIMPLE_SETTINGS=${SIMPLE_SETTINGS:-sf_notifier.settings.production}
export LOGPATH=/var/log/sf-notifier/sfnotifier.log
WORKERS=${SF_NOTIFIER_WORKERS:-4}
BUFFER=${SF_NOTIFIER_BUFFER_SIZE:-32768}
PORT=${SF_NOTIFIER_APP_PORT:-5000}
mkdir -p `dirname $LOGPATH`
touch $LOGPATH
chown -R 1000:1000 `dirname $LOGPATH`
uwsgi -p ${WORKERS} \
--uid 1000 \
--gid 1000 \
--http 0.0.0.0:${PORT} \
--wsgi-file sf_notifier/server.py \
--callable app_dispatch \
--buffer-size=${BUFFER} \
--max-worker-lifetime 300 \
--master \
--req-logger=file:${LOGPATH}