Skip to content

Commit

Permalink
Prepare agora mongo image to build with data
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaffter committed Jan 23, 2024
1 parent 83a068a commit 059b382
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
12 changes: 11 additions & 1 deletion apps/agora/mongo/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
FROM mongo:6.0.3
FROM mongo:6.0.3

ARG agoraDatasetVersion="1.0.0" \
synapseUsername="" \
synapseToken=""

COPY scripts ./scripts

RUN bash /scripts/download-data-from-synapse.sh

RUN bash /scripts/export-data-to-mongo.sh
3 changes: 3 additions & 0 deletions apps/agora/mongo/scripts/download-data-from-synapse.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

echo "Downloading Agora data from Synapse"
5 changes: 5 additions & 0 deletions apps/agora/mongo/scripts/export-data-to-mongo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

# NOTE: MongoDB is not running when the docker image is being built. Is there a way to process the
# dataset files so that the data are loaded into the MongoDB instance when it start?
echo "Exporting files to MongoDB format"

0 comments on commit 059b382

Please sign in to comment.