Trying this...

This commit is contained in:
2023-05-25 12:33:21 -04:00
parent 5500a5644d
commit 73ac3d2dc6
4 changed files with 7 additions and 6 deletions

View File

@@ -0,0 +1,14 @@
set -e
mongosh <<EOF
use $MONGO_INITDB_DATABASE
db.createUser({
user: '$DB_USERNAME',
pwd: '$DB_PASSWORD',
roles: [{
role: 'readWrite',
db: '$MONGO_INITDB_DATABASE'
}]
})
EOF