dokku-mongodb-plugin icon indicating copy to clipboard operation
dokku-mongodb-plugin copied to clipboard

added userDrop to get rid of newly made $APP mongodb username

Open GTDev87 opened this issue 11 years ago • 2 comments
trafficstars

Added:

mongo $mongodb_public_ip:$mongodb_port/$mongodb_database --quiet -u admin -p"$admin_pass" --authenticationDatabase="admin" --eval "db.dropUser("${APP}")"

to counter the:

mongo $mongodb_public_ip:$mongodb_port/$mongodb_database --quiet -u admin -p"$admin_pass" --authenticationDatabase="admin" --eval "db.createUser({user: "${mongodb_username}", pwd: "${mongodb_password}", roles : [{ role : "dbOwner", db: "${mongodb_database}"}] })"

GTDev87 avatar Jul 03 '14 05:07 GTDev87

+1

JMSwag avatar Jul 20 '14 01:07 JMSwag

I agree this needs to be done. However, since we can make multiple databases for each app, we probably need to check that no other databases exist for a given app before deleting it's user. If you can update the pull request I'll merge it, otherwise I'll try to get around to it in the next couple days.

jeffutter avatar Jul 21 '14 18:07 jeffutter