Sage-Bionetworks / sage-monorepo

Where OpenChallenges, Schematic, and other Sage open source apps are built
https://sage-bionetworks.github.io/sage-monorepo/
Apache License 2.0
21 stars 12 forks source link

feat(agora): add agora-data service to import data into agora-mongo (AG-1462) #2730

Closed hallieswan closed 4 days ago

hallieswan commented 4 days ago

Description

Adds an agora-data service to import data into agora-mongo.

Related Issue

Changelog

Preview

Generate the .env file for agora-data:

  $ nx run agora-data:create-config

  > nx run agora-data:create-config

——————————————————————————————————————————————————————————————————————————————————————

  NX   Successfully ran target create-config for project agora-data (77ms)

Update the .env file to specify the desired data release by updating DATA_FILE and DATA_VERSION.

Create a Synapse PAT with view/download permissions for a user that can download the data release (i.e. the data manifest file specified by DATA_FILE and DATA_VERSION and all files described within the manifest) and the team image files (i.e. all files within the folder specified by TEAM_IMAGES_ID).

Build images:

  $ agora-build-images

      ✔  nx run agora-app:build:production  [local cache]
      ✔  nx run agora-mongo:build-image (3s)
      ✔  nx run agora-app:server:production (9s)
      ✔  nx run agora-app:build-image (3s)
      ✔  nx run agora-data:build-image (25s)

  ——————————————————————————————————————————————————————————————————————————————————————

  NX   Successfully ran target build-image for 3 projects and 2 tasks they depend on (25s)

Start agora stack:

  $ nx run agora-app:serve-detach

  > nx run agora-app:serve-detach

  [+] Running 3/3
   ✔ Container agora-mongo  Started                                      0.5s 
   ✔ Container agora-data   Exited                                      73.5s 
   ✔ Container agora-app    Started                                     74.0s 

  ——————————————————————————————————————————————————————————————————————————————————————

  NX   Successfully ran target serve-detach for project agora-app (1m)

See agora-app at http://localhost:5200.

See seeded/indexed mongoDB in the MongoDB extension with this connection string: mongodb://{DB_USER}:{DB_PASS}@agora-mongo:{DB_PORT}, using the values specified in apps/agora/data/.env.