Maybe with a shell script...
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-05-12 15:30:38 -04:00
parent c6e5eaf3a1
commit 17949255d3
2 changed files with 15 additions and 1 deletions

14
mongo-init.sh Normal file
View File

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