From a2b85f402d263fa95b3b8529a3116c8896581228 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Sun, 20 Aug 2023 19:49:57 +0200 Subject: [PATCH] Added environment variables to configure in Docker environment --- module-server/src/main/resources/application-dev.yaml | 2 +- module-server/src/main/resources/application-prod.yaml | 4 ++-- module-server/src/main/resources/application.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/module-server/src/main/resources/application-dev.yaml b/module-server/src/main/resources/application-dev.yaml index 7f739d0..e7819cd 100644 --- a/module-server/src/main/resources/application-dev.yaml +++ b/module-server/src/main/resources/application-dev.yaml @@ -6,4 +6,4 @@ spring: config: import: - "classpath:config/wahlrecht.yaml" - - "optional:configserver:http://localhost:8888/config" + - "optional:configserver:${CONFIGSERVER_SCHEME:http}://${CONFIGSERVER_HOST:configserver}:${CONFIGSERVER_PORT:8888}/${CONFIGSERVER_PREFIX:config}" diff --git a/module-server/src/main/resources/application-prod.yaml b/module-server/src/main/resources/application-prod.yaml index ced3945..6b5b266 100644 --- a/module-server/src/main/resources/application-prod.yaml +++ b/module-server/src/main/resources/application-prod.yaml @@ -1,7 +1,7 @@ spring: config: import: - - "configserver:http://configserver:8888/config" + - "configserver:${CONFIGSERVER_SCHEME:http}://${CONFIGSERVER_HOST:configserver}:${CONFIGSERVER_PORT:8888}/${CONFIGSERVER_PREFIX:config}" kafka: bootstrap-servers: - - kafka:9092 + - ${KAFKA_HOST:kafka}:${KAFKA_PORT:9092} diff --git a/module-server/src/main/resources/application.yaml b/module-server/src/main/resources/application.yaml index b1f7131..c2cdb1f 100644 --- a/module-server/src/main/resources/application.yaml +++ b/module-server/src/main/resources/application.yaml @@ -38,7 +38,7 @@ spring: oauth2: resourceserver: jwt: - jwk-set-uri: https://id.2martens.de/realms/2martens/protocol/openid-connect/certs + jwk-set-uri: ${KEYCLOAK_URL:https://id.2martens.de}/realms/${KEYCLOAK_REALM:2martens}/protocol/openid-connect/certs application: name: wahlrecht