Created
January 29, 2020 19:47
-
-
Save skobba/b7cd6d90d25a484a5edb6141ea1d4a1a to your computer and use it in GitHub Desktop.
How to create user in mongodb with docker-compose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://github.com/tutumcloud/mongodb | |
| docker run -d -p 27017:27017 -p 28017:28017 -e MONGODB_USER="user" -e MONGODB_DATABASE="mydatabase" -e MONGODB_PASS="mypass" tutum/mongodb | |
| environment: | |
| MONGODB_USER: "${db_user_env}" | |
| MONGODB_DATABASE: "${dbname_env}" | |
| MONGODB_PASS: "${db_pass}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment