forked from apolloconfig/apollo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
executable file
·73 lines (42 loc) · 2.14 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/sh
# apollo config db info
apollo_config_db_url=jdbc:mysql://db:3306/ApolloConfigDB?characterEncoding=utf8
apollo_config_db_username=root
apollo_config_db_password=root
# apollo portal db info
apollo_portal_db_url=jdbc:mysql://db:3306/ApolloPortalDB?characterEncoding=utf8
apollo_portal_db_username=root
apollo_portal_db_password=root
# meta server url
dev_meta=http://apollo-configservice:8080
fat_meta=http://apollo-configservice:8080
uat_meta=http://apollo-configservice:8080
pro_meta=http://apollo-configservice:8080
META_SERVERS_OPTS="-Ddev_meta=$dev_meta -Dfat_meta=$fat_meta -Duat_meta=$uat_meta -Dpro_meta=$pro_meta"
# =============== Please do not modify the following content =============== #
# package config-service and admin-service
echo "==== starting to build config-service and admin-service ===="
mvn clean package -DskipTests -pl apollo-configservice,apollo-adminservice -am -Dapollo_profile=github -Dspring_datasource_url=$apollo_config_db_url -Dspring_datasource_username=$apollo_config_db_username -Dspring_datasource_password=$apollo_config_db_password
echo "==== building config-service and admin-service finished ===="
echo "==== starting to build portal ===="
mvn clean package -DskipTests -pl apollo-portal -am -Dapollo_profile=github -Dspring_datasource_url=$apollo_portal_db_url -Dspring_datasource_username=$apollo_portal_db_username -Dspring_datasource_password=$apollo_portal_db_password $META_SERVERS_OPTS
echo "==== building portal finished ===="
echo "==== starting to build client ===="
mvn clean install -DskipTests -pl apollo-client -am $META_SERVERS_OPTS
echo "==== building client finished ===="
echo "==== starting to build apollo-spring-boot-sample ===="
mvn clean package -DskipTests -pl apollo-spring-boot-sample
echo "==== building apollo-spring-boot-sample finished ===="
echo "==== starting to build docker images ===="
cd apollo-configservice
mvn docker:build
cd ../apollo-adminservice
mvn docker:build
cd ../apollo-portal
mvn docker:build
cd ../apollo-spring-boot-sample
mvn docker:build
echo "==== building docker images finished ===="
cd ..
echo "==== starting to run docker images ===="
docker-compose up