-
Notifications
You must be signed in to change notification settings - Fork 1
/
runner.sh
executable file
·100 lines (81 loc) · 1.18 KB
/
runner.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
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#!/bin/bash
# sync env file
if [ ! -f .env ]; then
if ! command -v envsubst &> /dev/null; then
cp .env.example .env
else
envsubst < .env.example > .env
fi
fi
set -a
# shellcheck disable=SC1091
source .env
set +a
set -ue
source ./setup/variables.sh
source ./setup/tips.sh
source ./setup/git.sh
source ./setup/ssl.sh
source ./setup/resource.sh
source ./setup/functions.sh
source ./setup/handlers.sh
case "$1" in
welcome | w)
welcome
;;
help | h)
usage
;;
git_sync | gs)
# $2: all, admin, fe, api-package
# $3: -f or --force
git_sync "$2" "${3:-none}"
;;
install | i)
install
;;
update | u)
update
;;
resource | r)
resource
;;
ssl)
ssl
;;
network | n)
network
;;
build | b)
build
;;
build_all | ba)
build_all
;;
start | s)
start
;;
start_all | sa)
start_all
;;
resource_database | rd)
resource_database
;;
es_import | ei)
elasticsearch_import
;;
all | a)
ssl
resource_database
build
git_sync all "${2:-none}"
install
resource
elasticsearch_import
start
;;
*)
usage
exit 1
;;
esac