dokku-mongodb-plugin
dokku-mongodb-plugin copied to clipboard
added userDrop to get rid of newly made $APP mongodb username
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}"}] })"
+1
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.