Node JS, MongoDB, and Express JS App
docker-compose build
after the build than docker up
docker-compose up
npm install mongoose --save
after mongoose is done installing docker up
docker-compose up
*Get into mongo on MacOS
- Get container id
docker container ls
- access mongo cli You can run the interactive mongo shell by running the following command:
docker run -it -p 28000:27017 --name mongoContainer mongo:latest mongo
Otherwise, if your container is already running, you can use the exec command:
docker exec -it mongoContainer mongo
- Get into mongo on windows
- Get container id
docker container ls
- access mongo cli
winpty docker exec -it <container-id> //bin//sh