blob: fd12ae6a9db34a9b4a6bfaa978b4a45ab37712c1 [file] [log] [blame]
Michal Kobus492d8bc2021-02-15 16:54:13 +01001#!/bin/ash
vitalygusev507dfdb2019-05-28 12:53:55 +04002
3export SIMPLE_SETTINGS=${SIMPLE_SETTINGS:-sf_notifier.settings.production}
4export SF_NOTIFIER_ALERT_ID_HASH_FUNC=${SF_NOTIFIER_ALERT_ID_HASH_FUNC:-sha256}
Michal Kobuse7589f72020-09-11 14:29:37 +02005export SF_NOTIFIER_ADD_LINKS=${SF_NOTIFIER_ADD_LINKS:-False}
vitalygusev507dfdb2019-05-28 12:53:55 +04006
7WORKERS=${SF_NOTIFIER_WORKERS:-4}
8BUFFER=${SF_NOTIFIER_BUFFER_SIZE:-32768}
9PORT=${SF_NOTIFIER_APP_PORT:-5000}
Michal Kobus492d8bc2021-02-15 16:54:13 +010010LOGPATH=/var/log/sf-notifier
vitalygusev507dfdb2019-05-28 12:53:55 +040011
Michal Kobus492d8bc2021-02-15 16:54:13 +010012mkdir -p $LOGPATH
13chown -R 1000:1000 $LOGPATH
vitalygusev507dfdb2019-05-28 12:53:55 +040014
Michal Kobusaa3accf2019-06-05 12:25:09 +020015uwsgi -p ${WORKERS} \
Michal Kobus492d8bc2021-02-15 16:54:13 +010016 --uid 1000 \
17 --gid 1000 \
vitalygusev507dfdb2019-05-28 12:53:55 +040018 --http 0.0.0.0:${PORT} \
19 --wsgi-file sf_notifier/server.py \
20 --callable app_dispatch \
21 --buffer-size=${BUFFER} \
22 --max-worker-lifetime 300 \
vitalygusev507dfdb2019-05-28 12:53:55 +040023 --master