diff --git a/fhir-ig-importer/importer/docker-compose.config.yml b/fhir-ig-importer/importer/docker-compose.config.yml index 0d11921a..3447da3b 100644 --- a/fhir-ig-importer/importer/docker-compose.config.yml +++ b/fhir-ig-importer/importer/docker-compose.config.yml @@ -12,6 +12,7 @@ services: OPENHIM_API_PASSWORD: ${OPENHIM_PASSWORD} # Reject unauthorised is only needed if the OpenHIM's SSL is not setup NODE_TLS_REJECT_UNAUTHORIZED: 0 + OPENHIM_CONSOLE_BASE_URL: ${OPENHIM_CONSOLE_BASE_URL} command: sh -c "node openhimConfig.js" configs: - source: fhir-ig-importer-config-importer-openhimConfig.js diff --git a/fhir-ig-importer/importer/volume/openhimConfig.js b/fhir-ig-importer/importer/volume/openhimConfig.js index cae7a270..56723f57 100644 --- a/fhir-ig-importer/importer/volume/openhimConfig.js +++ b/fhir-ig-importer/importer/volume/openhimConfig.js @@ -43,6 +43,16 @@ const appJsonData = JSON.parse( fs.readFileSync(path.resolve(__dirname, "ig-importer-app.json")) ); +//Substitute the url with environ variable + +let url = appJsonData.url; +let newUrl = url.replace( + "", + process.env.OPENHIM_CONSOLE_BASE_URL +); + +appJsonData.url = newUrl; + const data = JSON.stringify(jsonData); const appData = JSON.stringify(appJsonData); diff --git a/fhir-ig-importer/package-metadata.json b/fhir-ig-importer/package-metadata.json index e8c440e1..8f901077 100644 --- a/fhir-ig-importer/package-metadata.json +++ b/fhir-ig-importer/package-metadata.json @@ -16,6 +16,6 @@ "FHIR_IG_IMPORTER_CORE_URL": "http://0.0.0.0:3001/fhir/ig/v1.0", "FHIR_IG_IMPORTER_UI_VERSION": "latest", "FHIR_IG_IMPORTER_CORE_VERSION": "latest", - "OPENHIM_CONSOLE_URL": "http://localhost:9000" + "OPENHIM_CONSOLE_BASE_URL": "http://localhost:9000" } } diff --git a/interoperability-layer-openhim/package-metadata.json b/interoperability-layer-openhim/package-metadata.json index 1fa38624..0e47bdee 100644 --- a/interoperability-layer-openhim/package-metadata.json +++ b/interoperability-layer-openhim/package-metadata.json @@ -44,7 +44,7 @@ "KC_OPENHIM_ROOT_URL": "http://localhost:9000", "KC_API_URL": "http://identity-access-manager-keycloak:8080", "OPENHIM_SUBDOMAIN": "openhim", - "OPENHIM_CONSOLE_BASE_URL": "localhost:9000", + "OPENHIM_CONSOLE_BASE_URL": "http://localhost:9000", "OPENHIM_API_HOST": "localhost", "OPENHIM_API_PORT": "5001" } diff --git a/kafka-mapper-consumer/consumer-ui-app.json b/kafka-mapper-consumer/consumer-ui-app.json index b02b2bec..42d47345 100644 --- a/kafka-mapper-consumer/consumer-ui-app.json +++ b/kafka-mapper-consumer/consumer-ui-app.json @@ -3,7 +3,7 @@ "description": "Kafka mapper consumer microfrontends app", "category": "HIE Configuration", "type": "esmodule", - "url": "/jembi-kafka-mapper-consumer-ui.js", + "url": "/kafka-mapper-consumer-ui", "showInPortal": true, "showInSideBar": false, "access_roles": ["admin"], diff --git a/kafka-mapper-consumer/docker-compose.config.yml b/kafka-mapper-consumer/docker-compose.config.yml index 2e1b4db5..dd13d684 100644 --- a/kafka-mapper-consumer/docker-compose.config.yml +++ b/kafka-mapper-consumer/docker-compose.config.yml @@ -12,6 +12,7 @@ services: OPENHIM_API_PASSWORD: ${OPENHIM_PASSWORD} # Reject unauthorised is only needed if the OpenHIM's SSL is not setup NODE_TLS_REJECT_UNAUTHORIZED: 0 + OPENHIM_CONSOLE_BASE_URL: ${OPENHIM_CONSOLE_BASE_URL} command: sh -c "node openhimConfig.js" configs: - source: kafka-mapper-consumer-openhimConfig.js diff --git a/kafka-mapper-consumer/openhimConfig.js b/kafka-mapper-consumer/openhimConfig.js index a7868cde..149e6ee3 100644 --- a/kafka-mapper-consumer/openhimConfig.js +++ b/kafka-mapper-consumer/openhimConfig.js @@ -37,6 +37,16 @@ function makeRequest(options, data) { const appJsonData = JSON.parse( fs.readFileSync(path.resolve(__dirname, "consumer-ui-app.json")) ); +//Substitute the url with environ variable + +let url = appJsonData.url; +let newUrl = url.replace( + "", + process.env.OPENHIM_CONSOLE_BASE_URL +); + +appJsonData.url = newUrl; + const appData = JSON.stringify(appJsonData); const options = { diff --git a/kafka-mapper-consumer/package-metadata.json b/kafka-mapper-consumer/package-metadata.json index f40c4ac3..99d2428a 100644 --- a/kafka-mapper-consumer/package-metadata.json +++ b/kafka-mapper-consumer/package-metadata.json @@ -19,6 +19,6 @@ "CLICKHOUSE_PORT": "8123", "KAFKA_CONSUMER_MAPPER_MEDIATOR_VERSION": "jembi/kafka-mapper-consumer:v0.0.1", "KAFKA_CONSUMER_MAPPER_UI_VERSION": "jembi/kafka-mapper-consumer-ui:v0.0.1", - "OPENHIM_CONSOLE_URL": "http://localhost:9000" + "OPENHIM_CONSOLE_BASE_URL": "http://localhost:9000" } } diff --git a/reprocess-mediator/docker-compose.config.yml b/reprocess-mediator/docker-compose.config.yml index 1135b51e..6ed5fbb8 100644 --- a/reprocess-mediator/docker-compose.config.yml +++ b/reprocess-mediator/docker-compose.config.yml @@ -12,6 +12,7 @@ services: OPENHIM_API_PASSWORD: ${OPENHIM_PASSWORD} # Reject unauthorised is only needed if the OpenHIM's SSL is not setup NODE_TLS_REJECT_UNAUTHORIZED: 0 + OPENHIM_CONSOLE_BASE_URL: ${OPENHIM_CONSOLE_BASE_URL} command: sh -c "node openhimConfig.js" configs: - source: reprocess-openhimConfig.js diff --git a/reprocess-mediator/openhimConfig.js b/reprocess-mediator/openhimConfig.js index e5268dd9..f1c8781b 100644 --- a/reprocess-mediator/openhimConfig.js +++ b/reprocess-mediator/openhimConfig.js @@ -37,6 +37,15 @@ function makeRequest(options, data) { const appJsonData = JSON.parse( fs.readFileSync(path.resolve(__dirname, "reprocess-ui-app.json")) ); +//Substitute the url with environ variable + +let url = appJsonData.url; +let newUrl = url.replace( + "", + process.env.OPENHIM_CONSOLE_BASE_URL +); + +appJsonData.url = newUrl; const appData = JSON.stringify(appJsonData); const options = { diff --git a/reprocess-mediator/package-metadata.json b/reprocess-mediator/package-metadata.json index 98567a65..18f7f97e 100644 --- a/reprocess-mediator/package-metadata.json +++ b/reprocess-mediator/package-metadata.json @@ -16,6 +16,6 @@ "REPROCESS_MEDIATOR_UI_VERSION": "jembi/reprocess-mediator-ui:v0.1.0", "MONGODB_CONNECTION_STRING": "mongodb://mongo-1:27017/openhim", "MONGODB_DIRECT_CONNECTION": false, - "OPENHIM_CONSOLE_URL": "http://localhost:9000" + "OPENHIM_CONSOLE_BASE_URL": "http://localhost:9000" } } diff --git a/reprocess-mediator/reprocess-ui-app.json b/reprocess-mediator/reprocess-ui-app.json index 98997eff..f89da247 100644 --- a/reprocess-mediator/reprocess-ui-app.json +++ b/reprocess-mediator/reprocess-ui-app.json @@ -3,7 +3,7 @@ "description": "Reprocess microfrontends app", "category": "HIE Configuration", "type": "esmodule", - "url": "/jembi-reprocessor-mediator-microfrontend.js", + "url": "/reprocess-mediator-ui", "showInPortal": true, "showInSideBar": false, "access_roles": ["admin"],