blob: 4e212e2a2b4cc41562f43cf8c500c99b71c5e90f [file] [log] [blame]
#!/bin/sh
export SIMPLE_SETTINGS=${SIMPLE_SETTINGS:-sf_notifier.settings.production}
export SF_NOTIFIER_ALERT_ID_HASH_FUNC=${SF_NOTIFIER_ALERT_ID_HASH_FUNC:-sha256}
WORKERS=${SF_NOTIFIER_WORKERS:-4}
BUFFER=${SF_NOTIFIER_BUFFER_SIZE:-32768}
PORT=${SF_NOTIFIER_APP_PORT:-5000}
mkdir -p /var/log/sf-notifier
chown -R 999:999 /var/log/sf-notifier
uwsgi -p ${WORKERS} \
--uid 999 \
--gid 999 \
--http 0.0.0.0:${PORT} \
--wsgi-file sf_notifier/server.py \
--callable app_dispatch \
--buffer-size=${BUFFER} \
--max-worker-lifetime 300 \
--master