Docker is a set of platform as a service (PaaS) products that use OS-level virtualization to deliver software in packages called containers. The service has both free and premium tiers. The software that hosts the containers is called Docker Engine.
Project Homepage: Home - Docker
Documentation: Docker Documentation
-
express-mongo-app
-
Containerised APP
SERVICES:
MONGODB:
PORT: 2717
NODE:
PORT: 4000
-
INSTALL DOCKER
-
CLONE THIS REPOSITORY TO YOUR LOCAL SYSTEM
git clone https://github.com/Blackfury7/express-mongo-app.git
-
ENTER THE PROJECT
cd express-mongo-app/myapp
-
RUN THE DOCKER CONTAINERS WITH A SINGLE COMMAND
docker-compose up
-
NOW THE DOCKER CONTAINERS ARE RUNNING
-
YOU CAN ACCESS THE EXPRESS APP AT http://localhost:4000/ IN YOUR BROWSER
-
YOU CAN ACCESS THE MONGODB DOCKER CONTAINER WHICH IS ACCESSIBLE AT PORT: 2717
-
ACCESS WITH THE HELP OF MONGOSH (MONGODB SHELL)
-
INSTALL MONGOSH
# TO CHECK MONGOSH IS INSTALLED OR NOT
mongosh --version
# TO LOGIN INTO DOCKER MONGODB
mongosh --port 2717
# TO SHOW ALL AVAILABLE DB IN MONGO
show dbs
# TO SWITCH DB
use Tutorial
# TO SHOW TUTORIALS COLLECTION DATA
db.tutorials.find()