浏览代码

Update config to support multiple processes

Yiming Liu 9 年之前
父节点
当前提交
a89cbe5d02

+ 5 - 0
.gitignore

@@ -23,3 +23,8 @@ target
 
 # git
 *.orig
+
+dev
+fat
+uat
+prd

+ 1 - 1
apollo-biz/src/main/resources/application.properties

@@ -1,4 +1,4 @@
-spring.datasource.url = jdbc:h2:file:~/fxapolloconfigdb;mode=mysql
+spring.datasource.url = jdbc:h2:mem:~/fxapolloconfigdb;mode=mysql
 spring.datasource.username = sa
 spring.datasource.password =
 spring.jpa.hibernate.naming_strategy=org.hibernate.cfg.EJB3NamingStrategy

+ 1 - 1
apollo-configadmin/src/main/resources/application.yml

@@ -3,7 +3,7 @@ spring:
     name: apollo-configadmin
     
 server:
-  port: 9080
+  port: ${port:8080}
   
 logging:
   level:

+ 2 - 2
apollo-configadmin/src/main/resources/bootstrap.yml

@@ -1,8 +1,8 @@
 eureka:
   instance:
-    hostname: localhost
+    hostname: ${hostname:localhost}
   client:
     serviceUrl:
-      defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/
+      defaultZone: http://${eureka.instance.hostname}/eureka/
     healthcheck:
       enabled: true

+ 1 - 1
apollo-configserver/src/main/resources/application.yml

@@ -3,7 +3,7 @@ spring:
     name: apollo-configserver
 
 server:
-  port: 80
+  port: ${port:80}
   
 logging:
   level:

+ 2 - 2
apollo-configserver/src/main/resources/bootstrap.yml

@@ -1,8 +1,8 @@
 eureka:
   instance:
-    hostname: localhost
+    hostname: ${hostname:localhost}
   client:
     serviceUrl:
-      defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/
+      defaultZone: http://${eureka.instance.hostname}/eureka/
     healthcheck:
       enabled: true