Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update load_mongodump.sh script to update STUDY_CONFIG in docker-compose.dev.yml #163

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

iantei
Copy link
Contributor

@iantei iantei commented Oct 2, 2024

  • Update the STUDY_CONFIG in docker-compose.dev.yml config file with the program/study name from the database name of the dataset.
  • Expects the database to have a format of openpath_prod_. Transforms this database name into "abc-def-ghi", and sets it for the STUDY_CONFIG

Test execution with the following -

  • openpath-prod-usaid-laos-ev-snapshot-dec-20.tar.gz

Changes in the docker-compose.dev.yml file:

ashrest2-41625s:em-public-dashboard ashrest2$ git diff docker-compose.dev.yml
diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml
index 1906101..044b8a4 100644
--- a/docker-compose.dev.yml
+++ b/docker-compose.dev.yml
@@ -25,10 +25,10 @@ services:
     depends_on:
       - db
     environment:
-      - DB_HOST=db
+      - DB_HOST=mongodb://db/openpath_prod_usaid_laos_ev
       - WEB_SERVER_HOST=0.0.0.0
       - CRON_MODE=
-      - STUDY_CONFIG=stage-program
+      - STUDY_CONFIG=usaid-laos-ev
     ports:
       # ipynb in numbers
       - "47962:8888"
ashrest2-41625s:em-public-dashboard ashrest2$

All the documents were restored successfully

2024-10-02T20:19:11.872+0000    [########################]  openpath_prod_usaid_laos_ev.Stage_timeseries  2.42GB/2.42GB  (100.0%)
2024-10-02T20:19:11.872+0000    restoring indexes for collection openpath_prod_usaid_laos_ev.Stage_timeseries from metadata
2024-10-02T20:19:27.034+0000    finished restoring openpath_prod_usaid_laos_ev.Stage_timeseries (3494052 documents, 0 failures)
2024-10-02T20:19:27.034+0000    4441126 document(s) restored successfully. 0 document(s) failed to restore.
Database restore complete.

Similarly tested with :

  • openpath_prod_ca_ebike_may_29.tar.gz
  • openpath_prod_cortezebikes_feb_6.tar.gz

…e program/study name from the database name of the dataset.
@iantei iantei marked this pull request as ready for review October 2, 2024 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: PRs for review by peers
Development

Successfully merging this pull request may close these issues.

1 participant