| #!/bin/sh |
| |
| export SIMPLE_SETTINGS=${SIMPLE_SETTINGS:-sf_notifier.settings.production} |
| export SF_NOTIFIER_ALERT_ID_HASH_FUNC=${SF_NOTIFIER_ALERT_ID_HASH_FUNC:-sha256} |
| export SF_NOTIFIER_ADD_LINKS=${SF_NOTIFIER_ADD_LINKS:-False} |
| |
| WORKERS=${SF_NOTIFIER_WORKERS:-4} |
| BUFFER=${SF_NOTIFIER_BUFFER_SIZE:-32768} |
| PORT=${SF_NOTIFIER_APP_PORT:-5000} |
| |
| mkdir -p /var/log/sf-notifier |
| chown -R 999:999 /var/log/sf-notifier |
| |
| uwsgi -p ${WORKERS} \ |
| --uid 999 \ |
| --gid 999 \ |
| --http 0.0.0.0:${PORT} \ |
| --wsgi-file sf_notifier/server.py \ |
| --callable app_dispatch \ |
| --buffer-size=${BUFFER} \ |
| --max-worker-lifetime 300 \ |
| --master |