-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathrunserver
executable file
·35 lines (32 loc) · 999 Bytes
/
runserver
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash -ex
export ENABLE_DYNAMIC_COLLECTION_ADMINS="True"
/wait
if [[ "$DEBUG" == "true" ]]; then
# --max-requests 1 \ # poor man's autoreload
exec gunicorn --reload \
--access-logfile '-' \
--error-logfile '-' \
--log-level 'warning' \
--worker-class $GUNICORN_WORKER_CLASS \
--workers $GUNICORN_WORKERS \
--threads $GUNICORN_THREADS \
--max-requests $GUNICORN_MAX_REQUESTS \
--keep-alive 150 \
--timeout 350 \
--graceful-timeout 150 \
-b 0.0.0.0:8080 \
snoop.wsgi:application
else
exec gunicorn \
--error-logfile '-' \
--log-level 'warning' \
--worker-class $GUNICORN_WORKER_CLASS \
--workers $GUNICORN_WORKERS \
--threads $GUNICORN_THREADS \
--max-requests $GUNICORN_MAX_REQUESTS \
--keep-alive 150 \
--timeout 350 \
--graceful-timeout 150 \
-b 0.0.0.0:8080 \
snoop.wsgi:application
fi