-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
executable file
·56 lines (51 loc) · 1.4 KB
/
run.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
#!/bin/bash
if [ "$1" == "fromscratch" ]; then
docker-compose down -v
mvn clean
mvn install
docker-compose up --build --remove-orphans
elif [ "$1" == "tearbuild" ]; then
docker-compose down -v
docker-compose up --build --remove-orphans
else
docker-compose up --remove-orphans
fi
# if [ "$1" == "fromscratch" ]; then
# docker-compose down -v
# mvn clean
# mvn package
# docker-compose up --build
# elif [ "$1" == "tearbuild" ]; then
# docker-compose down -v
# docker-compose up --build --remove-orphans
# elif [ "$1" == "build" ]; then
# docker-compose up --build
# elif [ "$1" == "clientfromscratch" ]; then
# host="localhost"
# port="8080"
# mvn clean -pl client
# mvn package -pl client
# mvn exec:java -Dexec.args="-h $host -p $port" -pl client
# elif [ "$1" == "client" ]; then
# host="localhost"
# port="8080"
# mvn exec:java -Dexec.args="-h $host -p $port" -pl client
# else
# # docker-compose up --remove-orphans
# mvn exec:java -pl api.gateway
# fi
# mvn package
# Start order:
# 1. eureka.
# 2/3. zuul.
# 2/3. all microservices.
# if [ "$1" == "zuul" ]; then
# mvn spring-boot:run -pl api.gateway
# elif [ "$1" == "eureka" ]; then
# mvn spring-boot:run -pl service.discovery
# elif [ "$1" == "user" ]; then
# mvn spring-boot:run -pl users
# mvn spring-boot:run -pl service.discovery
# elif [ "$1" == "annotation" ]; then
# mvn spring-boot:run -pl annotations
# fi