blob: 17540a2de89fe99860b537c8a7a774b749063f10 [file] [log] [blame]
vitalygusev507dfdb2019-05-28 12:53:55 +04001#!/bin/sh
2
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}
vitalygusev507dfdb2019-05-28 12:53:55 +040010
11mkdir -p /var/log/sf-notifier
12chown -R 999:999 /var/log/sf-notifier
13
Michal Kobusaa3accf2019-06-05 12:25:09 +020014uwsgi -p ${WORKERS} \
vitalygusev507dfdb2019-05-28 12:53:55 +040015 --uid 999 \
16 --gid 999 \
17 --http 0.0.0.0:${PORT} \
18 --wsgi-file sf_notifier/server.py \
19 --callable app_dispatch \
20 --buffer-size=${BUFFER} \
21 --max-worker-lifetime 300 \
vitalygusev507dfdb2019-05-28 12:53:55 +040022 --master