From 8816c899e8aa2170e753f3250c74552d898520c2 Mon Sep 17 00:00:00 2001 From: Peter Motzko Date: Thu, 12 Oct 2023 12:03:20 +0200 Subject: [PATCH] feat(devel): make application port dynamic (parameter) --- dev-assets/docker-environment/docker-compose.yaml | 2 +- dev-assets/env-files/env.docker.dist | 3 ++- dev-assets/env-files/env.local.dist | 3 ++- dev-assets/scripts/get_Token.sh | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/dev-assets/docker-environment/docker-compose.yaml b/dev-assets/docker-environment/docker-compose.yaml index a2873cf45..ba28cf286 100644 --- a/dev-assets/docker-environment/docker-compose.yaml +++ b/dev-assets/docker-environment/docker-compose.yaml @@ -28,7 +28,7 @@ services: env_file: - ../env-files/env.$DEV_ENVIRONMENT ports: - - "8000:8000" + - "$APPLICATION_PORT:$APPLICATION_PORT" - "8090:8090" networks: - miw-net diff --git a/dev-assets/env-files/env.docker.dist b/dev-assets/env-files/env.docker.dist index 12aed3d56..b4b3e8e6d 100644 --- a/dev-assets/env-files/env.docker.dist +++ b/dev-assets/env-files/env.docker.dist @@ -34,7 +34,8 @@ KEYCLOAK_REALM=miw_test VC_SCHEMA_LINK="https://www.w3.org/2018/credentials/v1, https://catenax-ng.github.io/product-core-schemas/businessPartnerData.json" VC_EXPIRY_DATE=01-01-2025 SUPPORTED_FRAMEWORK_VC_TYPES="PcfCredential, SustainabilityCredential, QualityCredential, TraceabilityCredential, BehaviorTwinCredential, ResiliencyCredential" -MIW_HOST_NAME=miw +MIW_HOST_NAME=localhost +ENFORCE_HTTPS_IN_DID_RESOLUTION=false ######### DON'T MODIFY ANYTHING BELOW THIS LINE !!! ######### AUTH_SERVER_URL=http://keycloak:8080 diff --git a/dev-assets/env-files/env.local.dist b/dev-assets/env-files/env.local.dist index 3f9459316..721bd9d32 100644 --- a/dev-assets/env-files/env.local.dist +++ b/dev-assets/env-files/env.local.dist @@ -34,7 +34,8 @@ KEYCLOAK_REALM=miw_test VC_SCHEMA_LINK="https://www.w3.org/2018/credentials/v1, https://catenax-ng.github.io/product-core-schemas/businessPartnerData.json" VC_EXPIRY_DATE=01-01-2025 SUPPORTED_FRAMEWORK_VC_TYPES="PcfCredential, SustainabilityCredential, QualityCredential, TraceabilityCredential, BehaviorTwinCredential, ResiliencyCredential" -MIW_HOST_NAME=miw +MIW_HOST_NAME=localhost +ENFORCE_HTTPS_IN_DID_RESOLUTION=false ######### DON'T MODIFY ANYTHING BELOW THIS LINE !!! ######### AUTH_SERVER_URL=http://localhost:8080 diff --git a/dev-assets/scripts/get_Token.sh b/dev-assets/scripts/get_Token.sh index de719990f..143d7a5a8 100755 --- a/dev-assets/scripts/get_Token.sh +++ b/dev-assets/scripts/get_Token.sh @@ -20,11 +20,11 @@ # ********************************************************************************/ # -curl --location 'http://localhost:8080/realms/miw_test/protocol/openid-connect/token' \ +curl --location 'http://localhost:$APPLICATION_PORT/realms/miw_test/protocol/openid-connect/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'client_id=miw_private_client' \ --data-urlencode 'client_secret=miw_private_client' \ --data-urlencode 'grant_type=password' \ --data-urlencode 'username=catena-x' \ --data-urlencode 'password=password' \ - | jq -r '.access_token' \ No newline at end of file + | jq -r '.access_token'