From 2d810751513d5fc156c3cca9e56a3b15d4f46d5b Mon Sep 17 00:00:00 2001 From: iantei Date: Wed, 2 Oct 2024 13:08:44 -0700 Subject: [PATCH 1/2] Update the STUDY_CONFIG in docker-compose.dev.yml config file with the program/study name from the database name of the dataset. --- viz_scripts/docker/load_mongodump.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/viz_scripts/docker/load_mongodump.sh b/viz_scripts/docker/load_mongodump.sh index 64fc71a6..42f26b47 100644 --- a/viz_scripts/docker/load_mongodump.sh +++ b/viz_scripts/docker/load_mongodump.sh @@ -53,6 +53,9 @@ echo "Database Name: $DB_NAME" DB_HOST="mongodb://db/$DB_NAME" sed -i.bak "s|DB_HOST=.*|DB_HOST=$DB_HOST|" "$CONFIG_FILE" +STUDY_CONFIG=$(echo "$DB_NAME" | sed -E 's/openpath_prod_(.*)$/\1/' | tr '_' '-') +sed -i.bak "s|STUDY_CONFIG=.*|STUDY_CONFIG=$STUDY_CONFIG|" "$CONFIG_FILE" + echo "Updated docker-compose file:" cat "$CONFIG_FILE" From 242a7eae155a175e95b1d8534641fb9aaccdd257 Mon Sep 17 00:00:00 2001 From: iantei Date: Wed, 2 Oct 2024 13:29:18 -0700 Subject: [PATCH 2/2] Update comment for updating docker-compose config file with actual STUDY_CONFIG --- viz_scripts/docker/load_mongodump.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/viz_scripts/docker/load_mongodump.sh b/viz_scripts/docker/load_mongodump.sh index 42f26b47..dc5da1bd 100644 --- a/viz_scripts/docker/load_mongodump.sh +++ b/viz_scripts/docker/load_mongodump.sh @@ -53,6 +53,7 @@ echo "Database Name: $DB_NAME" DB_HOST="mongodb://db/$DB_NAME" sed -i.bak "s|DB_HOST=.*|DB_HOST=$DB_HOST|" "$CONFIG_FILE" +# Update the docker-compose configuration file with the actual STUDY_CONFIG STUDY_CONFIG=$(echo "$DB_NAME" | sed -E 's/openpath_prod_(.*)$/\1/' | tr '_' '-') sed -i.bak "s|STUDY_CONFIG=.*|STUDY_CONFIG=$STUDY_CONFIG|" "$CONFIG_FILE"