Run using docker compose
docker-compose up --build #run in foreground mode
docker-compose up --build -d #run in detach mode
Run using docker multi-stage
docker compose -f docker-compose-MS.yaml up --build #run in foreground mode
docker compose -f docker-compose-MS.yaml up --build -d #run in detach mode
It will build 2 images (frontend, backend), pull 2 images (mongo, mongo-express), and then run 4 containers for each of these images.
mongo
: actual database containermongo-express
: web-based mongo db admin interfacefrontend
: container for hosting frontend (react for normal docker, nginx for multi-stages)backend
: container for hosting backend
frontend web ui
: http://localhost:3000mongo express ui
: http://localhost:8081