-
-
Save vck/dcbe65d275c40c031ffa562025e77fff to your computer and use it in GitHub Desktop.
Docker compose file and example docker run command for my youtube video: https://youtu.be/gFjpv-nZO0U
This file contains 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
version: '3.8' | |
services: | |
mongo: | |
image: mongo:7.0 | |
environment: | |
MONGO_INITDB_ROOT_USERNAME: mongadmin | |
MONGO_INITDB_ROOT_PASSWORD: LikeAndSubscribe | |
ports: | |
- 27017:27017 | |
volumes: | |
- mongodata:/data/db | |
volumes: | |
mongodata: | |
driver: local |
This file contains 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
docker run -d \ | |
--name mongo-demo \ | |
-e MONGO_INITDB_ROOT_USERNAME=mongoadmin \ | |
-e MONGO_INITDB_ROOT_PASSWORD=LikeAndSubscribe \ | |
-p 27017:27017 \ | |
-v mongodemo:/data/db \ | |
mongo:7.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment