-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
run
executable file
·46 lines (36 loc) · 927 Bytes
/
run
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
36
37
38
39
40
41
42
43
44
45
46
#!/bin/sh
if [ x"$MAX_REQUESTS" = x"" ]; then
MAX_REQUESTS=1000
fi
if [ x"$MAX_REQUESTS_JITTER" = x"" ]; then
MAX_REQUESTS_JITTER=100
fi
if [ x"$LOG_LEVEL" = x"" ]; then
LOG_LEVEL=INFO
fi
if [ x"$NUM_WORKERS" = x"" ]; then
NUM_WORKERS=8
fi
if [ x"$TIMEOUT" = x"" ]; then
TIMEOUT=60
fi
if [ x"$QMK_API_PORT" = x"" ]; then
QMK_API_PORT=5001
fi
if [ x"$RELOAD" = x"1" ]; then
RELOAD="--reload"
else
RELOAD=""
fi
if [ x"$ACCESS_LOGFILE" = x"" ]; then
if [ "$LOG_LEVEL" = "DEBUG" ]; then
ACCESS_LOGFILE="-"
else
ACCESS_LOGFILE="/dev/null"
fi
fi
if [ -e /qmk_compiler ]; then
# Setup qmk_compiler in the devel environment
pip3 install --editable /qmk_compiler || exit
fi
exec gunicorn --access-logfile $ACCESS_LOGFILE --log-level $LOG_LEVEL -w $NUM_WORKERS -b 0.0.0.0:$QMK_API_PORT --max-requests $MAX_REQUESTS --max-requests-jitter $MAX_REQUESTS_JITTER -t $TIMEOUT $RELOAD web:app