From 2a9d924bc018f1facb7e75947c3b0cff6e48d878 Mon Sep 17 00:00:00 2001 From: ruhanga Date: Mon, 16 Dec 2024 13:49:27 +0300 Subject: [PATCH] OZ-742: Pulled and rebased from upstream --- .env | 2 +- scripts/docker-compose-files.txt | 1 + scripts/utils.sh | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.env b/.env index 204edcf..4315672 100644 --- a/.env +++ b/.env @@ -17,7 +17,7 @@ ENABLE_SSO=false # Bahmni EMR -LOKI_URL=http://localhost:3100/loki/api/v1/push +RUN_WITH_BAHMNI_EMR=false # Mail Config Properties Environment Variables MAIL_TRANSPORT_PROTOCOL=smtps diff --git a/scripts/docker-compose-files.txt b/scripts/docker-compose-files.txt index 723d993..49a0cd3 100755 --- a/scripts/docker-compose-files.txt +++ b/scripts/docker-compose-files.txt @@ -4,6 +4,7 @@ docker-compose-odoo.yml docker-compose-odoo-sso.yml docker-compose-openmrs.yml docker-compose-openmrs-sso.yml +docker-compose-bahmniemr.yml docker-compose-senaite.yml docker-compose-senaite-sso.yml docker-compose-backup.yml diff --git a/scripts/utils.sh b/scripts/utils.sh index 3df5fed..8017436 100644 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -69,6 +69,11 @@ function exportPaths () { function setDockerComposeCLIOptions () { # Parse 'docker-compose-files.txt' to get the list of Docker Compose files to run dockerComposeFiles=$(cat docker-compose-files.txt) + + if [ "$RUN_WITH_BAHMNI_EMR" == "true" ]; then + export ENABLE_SSO=false + fi + for file in ${dockerComposeFiles} do if [ "$ENABLE_SSO" != "true" ]; then @@ -76,6 +81,15 @@ function setDockerComposeCLIOptions () { continue fi fi + + if [[ "$file" == *"-bahmniemr.yml" && "$RUN_WITH_BAHMNI_EMR" == "false" ]]; then + continue + fi + + if [[ "$file" == *"-openmrs.yml" && "$RUN_WITH_BAHMNI_EMR" == "true" ]]; then + continue + fi + export dockerComposeFilesCLIOptions="$dockerComposeFilesCLIOptions -f ../$file" done