-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-entrypoint.sh
More file actions
executable file
·69 lines (58 loc) · 1.53 KB
/
docker-entrypoint.sh
File metadata and controls
executable file
·69 lines (58 loc) · 1.53 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash
set -e
printenv | sed 's/^\(.*\)$/export \1/g' > /cron_env.sh
chmod +x /cron_env.sh
touch /etc/crontab /etc/cron.*/* && cron
for i in $(seq 0 $(($BOKEH_NUM_PROCESSES-1)))
do
if [ -z "$DEV" ]
then
bokeh serve experiment\
--port "$((5000+$i))"\
--allow-websocket-origin 'thingapi.airpublic.local'\
--allow-websocket-origin 'thingapi.airpublic.eu'\
--allow-websocket-origin 'dashboards.airpublic.eu'\
--use-xheaders\
--unused-session-lifetime 300000\
>> bokeh.stdout\
2>> bokeh.stderr\
&
else
bokeh serve experiment\
--dev experiment/*\
--port "$((5000+$i))"\
--allow-websocket-origin 'localhost:8000'\
--allow-websocket-origin "localhost:$((5000+$i))"\
--allow-websocket-origin "thingapi-internal.airpublic.local:$((5000+$i))"\
--allow-websocket-origin 'thingapi-internal.airpublic.local:8001'\
--allow-websocket-origin 'thingapi.airpublic.local'\
--allow-websocket-origin "bokeh-$i.bokeh.airpublic.local"\
--use-xheaders\
--unused-session-lifetime 300000\
--log-level=debug \
>> bokeh.stdout\
2>> bokeh.stderr\
&
fi
done
python -m thingapi.lora.daemon >> lora.log 2>> lora.err &
gunicorn thingapi.wsgi:application \
--reload\
--worker-class sync\
--name thingapi_django\
--bind 0.0.0.0:8000\
--workers 20\
--threads 1\
--log-level=info\
--log-file=gunicorn.log\
--access-logfile=gunicorn.access.log\
&
tail -f \
cron.err\
cron.out\
bokeh.stdout\
bokeh.stderr\
gunicorn.log\
gunicorn.access.log\
lora.err\
lora.log\