vitalygusev | 507dfdb | 2019-05-28 12:53:55 +0400 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | export SIMPLE_SETTINGS=${SIMPLE_SETTINGS:-sf_notifier.settings.production} |
| 4 | export SF_NOTIFIER_ALERT_ID_HASH_FUNC=${SF_NOTIFIER_ALERT_ID_HASH_FUNC:-sha256} |
Michal Kobus | e7589f7 | 2020-09-11 14:29:37 +0200 | [diff] [blame^] | 5 | export SF_NOTIFIER_ADD_LINKS=${SF_NOTIFIER_ADD_LINKS:-False} |
vitalygusev | 507dfdb | 2019-05-28 12:53:55 +0400 | [diff] [blame] | 6 | |
| 7 | WORKERS=${SF_NOTIFIER_WORKERS:-4} |
| 8 | BUFFER=${SF_NOTIFIER_BUFFER_SIZE:-32768} |
| 9 | PORT=${SF_NOTIFIER_APP_PORT:-5000} |
vitalygusev | 507dfdb | 2019-05-28 12:53:55 +0400 | [diff] [blame] | 10 | |
| 11 | mkdir -p /var/log/sf-notifier |
| 12 | chown -R 999:999 /var/log/sf-notifier |
| 13 | |
Michal Kobus | aa3accf | 2019-06-05 12:25:09 +0200 | [diff] [blame] | 14 | uwsgi -p ${WORKERS} \ |
vitalygusev | 507dfdb | 2019-05-28 12:53:55 +0400 | [diff] [blame] | 15 | --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 \ |
vitalygusev | 507dfdb | 2019-05-28 12:53:55 +0400 | [diff] [blame] | 22 | --master |