-
Notifications
You must be signed in to change notification settings - Fork 0
/
app
executable file
·63 lines (56 loc) · 1.42 KB
/
app
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
#!/usr/bin/env bash
build() {
pushd ./frontend || exit 2
yarn install
NODE_OPTIONS="--max-old-space-size=4096" yarn build
chmod -R o+rX ./build
popd || exit 3
}
chmod -R 754 ./redis
chmod +x ./common/build.sh
export HOST_DATA_STORAGE=/mnt/storage
case "$1" in
"build")
echo "Building and up..."
build
./common/build.sh
docker-compose up -d --build
;;
"build-frontend")
echo "Building frontend only..."
build
;;
"up")
echo "Up..."
./common/build.sh
docker-compose up -d
;;
"down")
echo "Down..."
docker-compose down
;;
"stop")
echo "Stopping..."
docker-compose stop
;;
"start")
echo "Starting..."
docker-compose start
;;
"rm")
echo "Removing..."
docker-compose rm -f -s -v
;;
*)
echo "Usage: ./${0##*/} {build|build-frontend|up|down|stop|start|rm}"
echo "
build - Builds the frontend, the docker images and up the microservices
build-frontend - Builds only the frontend
up - up the microservices (similar: docker-compose up -d)
down - down the microservices (similar: docker-compose down)
stop - stop the microservices (similar: docker-compose stop)
start - start the microservices (similar: docker-compose start)
rm - remove the microservices (similar: docker-compose rm -f -s -v)
"
;;
esac