How to Setup MongoDB with Docker Compose + Use Mongo Shell ( Mongo DB + Docker + Mongo CLI / Shell )
How to setup MongoDB with Docker Compose. Quick and easy tutorial for setting this database up with docker. Also shows how to use the Mongo Shell or CLI to modify data.
Reminder to ensure docker is running in the background.
Code: https://github.com/Jasoncheung94/youtube-projects-code/blob/main/docker/mongo-docker/docker-compose.yml
Main folder: https://github.com/Jasoncheung94/youtube-projects-code/tree/main/docker
Commands to start:
docker-compose up -d
Commands to stop:
docker-compose down
Commands to run CLI via container:
docker exec -it mongodb bash
mongo –username root –password password –authenticationDatabase admin
Timeline:
0:00 – Create Project and Compose file
🎵 Track Info
––––––––––––––––––––––––––––––
Cali by Wataboi https://soundcloud.com/wataboi
Creative Commons — Attribution 3.0 Unported — CC BY 3.0
Free Download / Stream: https://bit.ly/wataboi-cali
Music promoted by Audio Library https://youtu.be/qXptaqHIH5g
––––––––––––––––––––––––––––––