blob: 4e212e2a2b4cc41562f43cf8c500c99b71c5e90f [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}
5
6WORKERS=${SF_NOTIFIER_WORKERS:-4}
7BUFFER=${SF_NOTIFIER_BUFFER_SIZE:-32768}
8PORT=${SF_NOTIFIER_APP_PORT:-5000}
vitalygusev507dfdb2019-05-28 12:53:55 +04009
10mkdir -p /var/log/sf-notifier
11chown -R 999:999 /var/log/sf-notifier
12
Michal Kobusaa3accf2019-06-05 12:25:09 +020013uwsgi -p ${WORKERS} \
vitalygusev507dfdb2019-05-28 12:53:55 +040014 --uid 999 \
15 --gid 999 \
16 --http 0.0.0.0:${PORT} \
17 --wsgi-file sf_notifier/server.py \
18 --callable app_dispatch \
19 --buffer-size=${BUFFER} \
20 --max-worker-lifetime 300 \
vitalygusev507dfdb2019-05-28 12:53:55 +040021 --master