-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
run
executable file
·36 lines (28 loc) · 649 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
#!/bin/sh
if [ -d /kle2xy ]; then
pip install -e /kle2xy
fi
if [ -d /qmk_compiler ]; then
pip install -e /qmk_compiler
fi
if [ x"$MAX_REQUESTS" = x"" ]; then
MAX_REQUESTS=1000
fi
if [ x"$MAX_REQUESTS_JITTER" = x"" ]; then
MAX_REQUESTS_JITTER=100
fi
if [ x"$NUM_WORKERS" = x"" ]; then
NUM_WORKERS=8
fi
if [ x"$TIMEOUT" = x"" ]; then
TIMEOUT=60
fi
if [ x"$PORT" = x"" ]; then
PORT=5000
fi
if [ x"$RELOAD" = x"1" ]; then
RELOAD="--reload"
else
RELOAD=""
fi
exec gunicorn -w $NUM_WORKERS -b 0.0.0.0:$PORT --max-requests $MAX_REQUESTS --max-requests-jitter $MAX_REQUESTS_JITTER -t $TIMEOUT $RELOAD qmk_bot:app