forked from codecov/codecov-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstaging.sh
More file actions
19 lines (16 loc) · 802 Bytes
/
staging.sh
File metadata and controls
19 lines (16 loc) · 802 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
# starts the development server using gunicorn
# NEVER run production with the --reload option command
echo "Starting gunicorn in dev mode"
export PYTHONWARNINGS=always
prefix=""
if [ -f "/usr/local/bin/berglas" ]; then
prefix="berglas exec --"
fi
if [ "$GUNICORN_WORKERS" -gt 1 ];
then
export PROMETHEUS_MULTIPROC_DIR="${PROMETHEUS_MULTIPROC_DIR:-$HOME/.prometheus}"
rm -r ${PROMETHEUS_MULTIPROC_DIR?}/* 2> /dev/null
mkdir -p "$PROMETHEUS_MULTIPROC_DIR"
fi
$prefix gunicorn codecov.wsgi:application --reload --workers=${GUNICORN_WORKERS:-2} --threads=${GUNICORN_THREADS:-1} --worker-connections=${GUNICORN_WORKER_CONNECTIONS:-1000} --bind 0.0.0.0:8000 --access-logfile '-' --timeout "${GUNICORN_TIMEOUT:-600}" --disable-redirect-access-to-syslog --config=gunicorn.conf.py