From f6f8e145d1fc92118b874cbe0f4c3aeb29b33dc5 Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Mon, 25 Jun 2018 19:16:42 -0700 Subject: [PATCH] get the mongo authentication to workgit add . --- mongo/init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mongo/init.sh b/mongo/init.sh index 76248c51..c574d6b4 100644 --- a/mongo/init.sh +++ b/mongo/init.sh @@ -1 +1 @@ -mongo $MONGO_INITDB_DATABASE --eval "db.createUser({ user: '$MONGO_RW_USERNAME', pwd: '$MONGO_RW_PASSWORD', roles: [ 'readWrite' ] })" \ No newline at end of file +mongo admin -u $MONGO_INITDB_ROOT_USERNAME -p $MONGO_INITDB_ROOT_PASSWORD --eval "db.createUser({ user: '$MONGO_RW_USERNAME', pwd: '$MONGO_RW_PASSWORD', roles: [ { role: 'readWrite', db: '$MONGO_INITDB_DATABASE' }, { role: 'readWrite', db: 'sessions' }] })" \ No newline at end of file