From b9636e68763f09cca6db3e44a6fefe95937594b0 Mon Sep 17 00:00:00 2001 From: MrSebastian <13592751+MrSebastian@users.noreply.github.com> Date: Thu, 11 Jul 2024 09:29:22 +0200 Subject: [PATCH 1/6] use h2 on local profile --- wls-eai-service/src/main/resources/application.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wls-eai-service/src/main/resources/application.yml b/wls-eai-service/src/main/resources/application.yml index 7e2751c2..2449fb8a 100644 --- a/wls-eai-service/src/main/resources/application.yml +++ b/wls-eai-service/src/main/resources/application.yml @@ -4,7 +4,7 @@ spring: profiles: group: local: - - db-oracle + - db-h2 flyway: locations: - classpath:db/migrations/{vendor} From 8321127352e01fee9d6c0ce04c59ef7062e2c402 Mon Sep 17 00:00:00 2001 From: MrSebastian <13592751+MrSebastian@users.noreply.github.com> Date: Thu, 11 Jul 2024 09:29:57 +0200 Subject: [PATCH 2/6] use 39149 as port on local --- wls-eai-service/src/main/resources/application-local.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wls-eai-service/src/main/resources/application-local.yml b/wls-eai-service/src/main/resources/application-local.yml index 1ae80883..fe053129 100644 --- a/wls-eai-service/src/main/resources/application-local.yml +++ b/wls-eai-service/src/main/resources/application-local.yml @@ -1,2 +1,2 @@ server: - port: 39146 \ No newline at end of file + port: 39149 \ No newline at end of file From 44ce1c92eb1318ac8198ffab26336900a787e05f Mon Sep 17 00:00:00 2001 From: MrSebastian <13592751+MrSebastian@users.noreply.github.com> Date: Thu, 11 Jul 2024 09:30:12 +0200 Subject: [PATCH 3/6] add eai-service vars --- stack/.env | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/stack/.env b/stack/.env index f977b7ba..1ec10b8e 100644 --- a/stack/.env +++ b/stack/.env @@ -27,4 +27,8 @@ WLS_BRIEFWAHL_SERVICE_KEYCLOAK_URL=http://kubernetes.docker.internal:8100/auth/r WLS_WAHLVORBEREITUNG_SERVICE_PROFILE=local,db-oracle,dummy.nobezirkid.check WLS_WAHLVORBEREITUNG_SERVICE_DB_URL=jdbc:oracle:thin:@//wls-db-oracle:1521/XEPDB1 -WLS_WAHLVORBEREITUNG_SERVICE_KEYCLOAK_URL=http://kubernetes.docker.internal:8100/auth/realms/${SSO_REALM}/protocol/openid-connect \ No newline at end of file +WLS_WAHLVORBEREITUNG_SERVICE_KEYCLOAK_URL=http://kubernetes.docker.internal:8100/auth/realms/${SSO_REALM}/protocol/openid-connect + +WLS_EAI_SERVICE_PROFILE=local,db-oracle,db-dummydata +WLS_EAI_SERVICE_DB_URL=jdbc:oracle:thin:@//wls-db-oracle:1521/XEPDB1 +WLS_EAI_SERVICE_KEYCLOAK_URL=http://kubernetes.docker.internal:8100/auth/realms/${SSO_REALM}/protocol/openid-connect \ No newline at end of file From 7cf772cebf5a4d22da4bd261126d2e221996b572 Mon Sep 17 00:00:00 2001 From: MrSebastian <13592751+MrSebastian@users.noreply.github.com> Date: Thu, 11 Jul 2024 09:30:42 +0200 Subject: [PATCH 4/6] add eai service to docker compose --- stack/docker-compose.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/stack/docker-compose.yml b/stack/docker-compose.yml index fc730a94..06ad2229 100644 --- a/stack/docker-compose.yml +++ b/stack/docker-compose.yml @@ -77,6 +77,25 @@ services: - services - keycloak + wls-eai-service: + container_name: wls-eai-service + image: ghcr.io/it-at-m/wahllokalsystem-wls-eai-service:latest + depends_on: + - wls-db-oracle + env_file: + - .env + environment: + - SPRING_PROFILES_ACTIVE=${WLS_EAI_SERVICE_PROFILE} + - SPRING_DATASOURCE_URL=${WLS_EAI_SERVICE_DB_URL} + - SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_JWK-SET-URI=${WLS_EAI_SERVICE_KEYCLOAK_URL}/certs + - SECURITY_OAUTH2_RESOURCE_USER-INFO-URI=${WLS_EAI_SERVICE_KEYCLOAK_URL}/userinfo + - SERVER_PORT=8080 + ports: + - 8300:8080 + networks: + - services + - keycloak + ## Keycloak wls-keycloak: container_name: wls-keycloak From a05139d98907568918f7d39b8df9127a492c6d8c Mon Sep 17 00:00:00 2001 From: MrSebastian <13592751+MrSebastian@users.noreply.github.com> Date: Thu, 11 Jul 2024 09:34:28 +0200 Subject: [PATCH 5/6] update port in http env for local usage --- .../src/test/resources/httpRequests/http-client.env.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wls-eai-service/src/test/resources/httpRequests/http-client.env.json b/wls-eai-service/src/test/resources/httpRequests/http-client.env.json index 9f20d0ca..b2ab51cf 100644 --- a/wls-eai-service/src/test/resources/httpRequests/http-client.env.json +++ b/wls-eai-service/src/test/resources/httpRequests/http-client.env.json @@ -4,7 +4,7 @@ "SSO_URL": "http://kubernetes.docker.internal:8100" }, "nonDocker": { - "WLS_EAI_SERVICE_URL": "http://localhost:39146", + "WLS_EAI_SERVICE_URL": "http://localhost:39149", "SSO_URL": "http://kubernetes.docker.internal:8100" } } \ No newline at end of file From b312ca9e92871f76ce366c34ec051e4e745ec83a Mon Sep 17 00:00:00 2001 From: MrSebastian <13592751+MrSebastian@users.noreply.github.com> Date: Thu, 11 Jul 2024 09:35:17 +0200 Subject: [PATCH 6/6] add profile db-dummydata to run scripts --- wls-eai-service/runLocal.bat | 2 +- wls-eai-service/runLocal.sh | 2 +- wls-eai-service/runLocalNoSecurity.bat | 2 +- wls-eai-service/runLocalNoSecurity.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wls-eai-service/runLocal.bat b/wls-eai-service/runLocal.bat index 39976102..3090a0cf 100644 --- a/wls-eai-service/runLocal.bat +++ b/wls-eai-service/runLocal.bat @@ -1 +1 @@ -mvn clean spring-boot:run -Dspring-boot.run.jvmArguments="-Dspring.profiles.active=local" +mvn clean spring-boot:run -Dspring-boot.run.jvmArguments="-Dspring.profiles.active=local,db-dummydata" diff --git a/wls-eai-service/runLocal.sh b/wls-eai-service/runLocal.sh index 4ecb1945..61468d11 100644 --- a/wls-eai-service/runLocal.sh +++ b/wls-eai-service/runLocal.sh @@ -1,2 +1,2 @@ #!/bin/bash -mvn clean spring-boot:run -Dspring-boot.run.jvmArguments="-Dspring.profiles.active=local" +mvn clean spring-boot:run -Dspring-boot.run.jvmArguments="-Dspring.profiles.active=local,db-dummydata" diff --git a/wls-eai-service/runLocalNoSecurity.bat b/wls-eai-service/runLocalNoSecurity.bat index e1571711..3c0657cd 100644 --- a/wls-eai-service/runLocalNoSecurity.bat +++ b/wls-eai-service/runLocalNoSecurity.bat @@ -1 +1 @@ -mvn clean spring-boot:run -Dspring-boot.run.jvmArguments="-Dspring.profiles.active=local,no-security" +mvn clean spring-boot:run -Dspring-boot.run.jvmArguments="-Dspring.profiles.active=local,no-security,db-dummydata" diff --git a/wls-eai-service/runLocalNoSecurity.sh b/wls-eai-service/runLocalNoSecurity.sh index 69535f25..b70319f6 100644 --- a/wls-eai-service/runLocalNoSecurity.sh +++ b/wls-eai-service/runLocalNoSecurity.sh @@ -1,2 +1,2 @@ #!/bin/bash -mvn clean spring-boot:run -Dspring-boot.run.jvmArguments="-Dspring.profiles.active=local,no-security" +mvn clean spring-boot:run -Dspring-boot.run.jvmArguments="-Dspring.profiles.active=local,no-security,db-dummydata"