Browse Source

External global config per profile

Monte Cillo Co 8 years ago
parent
commit
cd1218dc8e
5 changed files with 36 additions and 46 deletions
  1. 11 0
      application-dev.yml
  2. 6 0
      application-pemc-staging.yml
  3. 8 0
      application-staging.yml
  4. 10 0
      application-uat.yml
  5. 1 46
      application.yml

+ 11 - 0
application-dev.yml

@@ -0,0 +1,11 @@
+spring:
+  jpa:
+    show-sql: true
+    properties:
+      hibernate.use_sql_comments: true
+      hibernate.format_sql: true
+      javax.persistence.schema-generation.database.action: none
+      javax.persistence.schema-generation.create-source: metadata
+      javax.persistence.schema-generation.scripts.action: drop-and-create
+      javax.persistence.schema-generation.scripts.create-target: target/create.sql
+      javax.persistence.schema-generation.scripts.drop-target: target/drop.sql

+ 6 - 0
application-pemc-staging.yml

@@ -0,0 +1,6 @@
+spring:
+  profiles.include: docker
+  rabbitmq:
+    host: 192.168.39.117
+logging.level:
+  com.pemc.crss: INFO

+ 8 - 0
application-staging.yml

@@ -0,0 +1,8 @@
+spring:
+  profiles.include: docker
+  rabbitmq:
+    host: rabbitmq
+  redis:
+    host: redis
+graylog:
+  host: 192.168.241.62

+ 10 - 0
application-uat.yml

@@ -0,0 +1,10 @@
+spring:
+  profiles.include: docker
+  rabbitmq:
+    host: pemc-oracle.ss.exist.com
+  redis:
+    host: 192.168.235.6
+logging.level:
+  com.pemc.crss: INFO
+graylog:
+  host: 192.168.235.6

+ 1 - 46
application.yml

@@ -43,57 +43,12 @@ logging:
     com.netflix: WARN
     org.springframework.cloud: WARN
 
----
-spring:
-  profiles: dev
-  jpa:
-    show-sql: true
-    properties:
-      hibernate.use_sql_comments: true
-      hibernate.format_sql: true
-      javax.persistence.schema-generation.database.action: none
-      javax.persistence.schema-generation.create-source: metadata
-      javax.persistence.schema-generation.scripts.action: drop-and-create
-      javax.persistence.schema-generation.scripts.create-target: target/create.sql
-      javax.persistence.schema-generation.scripts.drop-target: target/drop.sql
+# TODO: remove this 2 profiles below if done migrating to new environment
 ---
 spring:
   profiles: docker
 security.server.url: http://app:8080/admin
 
----
-spring:
-  profiles: staging
-  profiles.include: docker
-  rabbitmq:
-    host: rabbitmq
-  redis:
-    host: redis
-graylog:
-  host: 192.168.241.62
-
----
-spring:
-  profiles: uat
-  profiles.include: docker
-  rabbitmq:
-    host: pemc-oracle.ss.exist.com
-  redis:
-    host: 192.168.235.6
-logging.level:
-  com.pemc.crss: INFO
-graylog:
-  host: 192.168.235.6
-
----
-spring:
-  profiles: pemc-staging
-  profiles.include: docker
-  rabbitmq:
-    host: 192.168.39.117
-logging.level:
-  com.pemc.crss: INFO
-
 ---
 spring:
   profiles: dcos