-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathrun-with-local-build.sh
executable file
·62 lines (49 loc) · 1.66 KB
/
run-with-local-build.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
#!/bin/bash
printf "========== Executing Docker Compose with Build to start the application =========\n"
printf "\n"
printf "========== Building local Exchange Back End Project with local Maven ============\n"
printf "\n"
cd exchange-back-end/
./mvnw package
cd ..
printf "\n"
printf "============ Exchange Back End Project builded successfully by Maven =============\n"
printf "\n\n\n"
printf "=========== Building local Broker Back End Project with local Maven ===============\n"
printf "\n"
cd broker-back-end/
./mvnw package
cd ..
printf "\n"
printf "============= Broker Back End Project builded successfully by Maven ==============\n"
printf "\n\n\n"
printf "======== Building local Exchange Front End Project with local Angular/NPM =========\n"
printf "\n"
cd exchange-front-end/
npm install
ng build --prod
cd ..
printf "\n"
printf "========== Exchange Front End Project builded successfully by Angular/NPM =========\n"
printf "\n\n\n"
printf "========= Building local Broker Front End Project with local Angular/NPM ==========\n"
printf "\n"
cd broker-front-end/
npm install
ng build --prod
cd ..
printf "\n"
printf "=========== Broker Front End Project builded successfully by Angular/NPM ===========\n"
printf "\n\n\n"
function ctrl_c() {
printf "\n"
printf '===================================================================================\n'
printf '================= EXECUTIN DOCKER COMPOSE DOWN AFTER CTRL+C =======================\n'
printf '===================================================================================\n'
printf "\n"
docker-compose -f ./docker-compose.yml down
exit
}
trap ctrl_c INT
docker-compose -f ./docker-compose.yml up --build
ctrl_c