-
Notifications
You must be signed in to change notification settings - Fork 41
/
entrypoint.sh
executable file
·39 lines (34 loc) · 1.74 KB
/
entrypoint.sh
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
#!/bin/sh
public_port () {
python3.11 -c "import app_common_python as a;print(a.LoadedConfig.publicPort or 8000)"
}
metrics_port () {
python3.11 -c "import app_common_python as a;print(a.LoadedConfig.metricsPort or 9000)"
}
cd $(dirname $0)
if [[ ! -z $1 ]]; then
if [[ "$1" == "vmaas-sync" ]]; then
exec python3.11 -m vmaas_sync.vmaas_sync
elif [[ "$1" == "manager" ]]; then
exec gunicorn -c manager/gunicorn_conf.py -w ${GUNICORN_WORKERS:-4} --bind=0.0.0.0:$(public_port) --bind=0.0.0.0:$(metrics_port) --timeout=60 --limit-request-field_size=65535 manager.main
elif [[ "$1" == "manager-dev" ]]; then
exec gunicorn --reload -c manager/gunicorn_conf.py -w ${GUNICORN_WORKERS:-4} --bind=0.0.0.0:$(public_port) --bind=0.0.0.0:$(metrics_port) --timeout=60 --limit-request-field_size=65535 manager.main
elif [[ "$1" == "manager-admin" ]]; then
exec gunicorn -c manager/gunicorn_conf.py -w ${GUNICORN_WORKERS:-4} --bind=0.0.0.0:$(public_port) --bind=0.0.0.0:$(metrics_port) --timeout=60 --limit-request-field_size=65535 manager.admin
elif [[ "$1" == "taskomatic" ]]; then
exec python3.11 -m taskomatic.taskomatic
elif [[ "$1" == "notificator" ]]; then
exec python3.11 -m notificator.notificator
elif [[ "$1" == "exploit-sync" ]]; then
exec python3.11 -m exploit_sync.exploit_sync
elif [[ "$1" == "grouper" ]]; then
exec python3.11 -m grouper.grouper
elif [[ "$1" == "listener" ]]; then
exec python3.11 -m listener.listener
elif [[ "$1" == "evaluator" ]]; then
exec python3.11 -m evaluator.evaluator
elif [[ "$1" == "cluster" ]]; then
exec python3.11 -m cluster.cluster
fi
fi
echo "Please specify service name as the first argument."