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} |
| 5 | |
| 6 | WORKERS=${SF_NOTIFIER_WORKERS:-4} |
| 7 | BUFFER=${SF_NOTIFIER_BUFFER_SIZE:-32768} |
| 8 | PORT=${SF_NOTIFIER_APP_PORT:-5000} |
vitalygusev | 507dfdb | 2019-05-28 12:53:55 +0400 | [diff] [blame] | 9 | |
| 10 | mkdir -p /var/log/sf-notifier |
| 11 | chown -R 999:999 /var/log/sf-notifier |
| 12 | |
Michal Kobus | aa3accf | 2019-06-05 12:25:09 +0200 | [diff] [blame] | 13 | uwsgi -p ${WORKERS} \ |
vitalygusev | 507dfdb | 2019-05-28 12:53:55 +0400 | [diff] [blame] | 14 | --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 \ |
vitalygusev | 507dfdb | 2019-05-28 12:53:55 +0400 | [diff] [blame] | 21 | --master |