Skip to content

Commit

Permalink
Merge pull request #163 from iantei/load_mongodump_studytype_update
Browse files Browse the repository at this point in the history
Update load_mongodump.sh script to update STUDY_CONFIG in docker-compose.dev.yml
  • Loading branch information
shankari authored Jan 4, 2025
2 parents e199ac8 + 242a7ea commit 178c3e4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions viz_scripts/docker/load_mongodump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ 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"

echo "Updated docker-compose file:"
cat "$CONFIG_FILE"

Expand Down

0 comments on commit 178c3e4

Please sign in to comment.