summaryrefslogtreecommitdiff
path: root/data/mongodb_entrypoint.sh
diff options
context:
space:
mode:
authorVictor Näslund <victor@sunet.se>2022-11-13 17:49:45 +0100
committerVictor Näslund <victor@sunet.se>2022-11-13 17:49:45 +0100
commit563607809d993c9e496423829b1f93def22a4aac (patch)
tree6d7f3b7dc9466fa70750c67a661751f9d1fffa56 /data/mongodb_entrypoint.sh
parent60029b36e9bdd773be923a3cd7d5d30170c669b3 (diff)
more stuff
Diffstat (limited to 'data/mongodb_entrypoint.sh')
-rwxr-xr-xdata/mongodb_entrypoint.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/data/mongodb_entrypoint.sh b/data/mongodb_entrypoint.sh
index 3db507a..7a81abc 100755
--- a/data/mongodb_entrypoint.sh
+++ b/data/mongodb_entrypoint.sh
@@ -8,7 +8,9 @@ then
cp /init-mongodb.js /data/db/init-mongodb.js
sed -i "s/REPLACE_USERNAME/$MONGODB_USERNAME/g" /data/db/init-mongodb.js
sed -i "s/REPLACE_PASSWORD/$MONGODB_PASSWORD/g" /data/db/init-mongodb.js
+ sed -i "s/REPLACE_COLLECTION/$MONGODB_COLLECTION/g" /data/db/init-mongodb.js
+ # Update and shutdown our DB with changes
/usr/bin/mongosh localhost:27015/production /data/db/init-mongodb.js
sleep 1 # Allow DB to shutdown
/usr/bin/touch /data/db/user_exist