blob: fc6325f598c912dfe6ad9e4142a408d9b2c640fd [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}
Michal Kobus2e85ef82021-06-24 18:01:43 +02004export LOGPATH=/var/log/sf-notifier/sfnotifier.log
vitalygusev507dfdb2019-05-28 12:53:55 +04005
6WORKERS=${SF_NOTIFIER_WORKERS:-4}
7BUFFER=${SF_NOTIFIER_BUFFER_SIZE:-32768}
8PORT=${SF_NOTIFIER_APP_PORT:-5000}
vitalygusev507dfdb2019-05-28 12:53:55 +04009
Michal Kobus2e85ef82021-06-24 18:01:43 +020010mkdir -p `dirname $LOGPATH`
11touch $LOGPATH
12chown -R 1000:1000 `dirname $LOGPATH`
vitalygusev507dfdb2019-05-28 12:53:55 +040013
Michal Kobusaa3accf2019-06-05 12:25:09 +020014uwsgi -p ${WORKERS} \
Michal Kobus492d8bc2021-02-15 16:54:13 +010015 --uid 1000 \
16 --gid 1000 \
vitalygusev507dfdb2019-05-28 12:53:55 +040017 --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 \
Michal Kobus2e85ef82021-06-24 18:01:43 +020022 --master \
23 --req-logger=file:${LOGPATH}