This repository has been archived on 2023-05-17. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
auth/mongo-init.sh
mifi 17949255d3
All checks were successful
continuous-integration/drone/push Build is passing
Maybe with a shell script...
2023-05-12 15:30:38 -04:00

14 lines
190 B
Bash

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