blob: f6f475d04abf6d31c1fa77816ba2cb00611d5d39 [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 Kobus7187d6b2023-07-11 11:56:06 +02004export PROMETHEUS_MULTIPROC_DIR=/tmp/prom
5
6mkdir -p ${PROMETHEUS_MULTIPROC_DIR}
vitalygusev507dfdb2019-05-28 12:53:55 +04007
8WORKERS=${SF_NOTIFIER_WORKERS:-4}
9BUFFER=${SF_NOTIFIER_BUFFER_SIZE:-32768}
10PORT=${SF_NOTIFIER_APP_PORT:-5000}
vitalygusev507dfdb2019-05-28 12:53:55 +040011
Michal Kobus7187d6b2023-07-11 11:56:06 +020012uwsgi \
13 --http-processes 2 \
14 --processes ${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 \
Michal Kobus7187d6b2023-07-11 11:56:06 +020019 --callable app \
vitalygusev507dfdb2019-05-28 12:53:55 +040020 --buffer-size=${BUFFER} \
Michal Kobus2e85ef82021-06-24 18:01:43 +020021 --master \
Michal Kobus7187d6b2023-07-11 11:56:06 +020022 --req-logger=file:${LOGPATH} \
23 --enable-threads \
24 --single-interpreter \
25 --vacuum \
26 --die-on-term \
27 --need-app \
28 --disable-logging \
29 --log-4xx \
30 --log-5xx \
31 --auto-procname \
32 --procname-prefix "sf_notifier " \
33 --max-requests 1000 \
34 --max-worker-lifetime 3600 \
35 --reload-on-rss 512 \
36 --worker-reload-mercy 60 \
37 --harakiri 60 \
38 --py-call-osafterfork