This project focuses on trying many concepts relates to mircoservices using Node.js, Docker and Docker-compose.
Assuming we have an online store here for watches, mobiles, etc. Currently the project contains three services as follows:
- Manager: is the manager service act as web service.
- Watches: is the service handles requests relates to watches category.
- mongo: watches database.
- Divide the project to smaller services.
- Make them talk to each others.
- Build a Dockerfile suits the production environment.
- Build a docker-compose.yaml file suits the development environment.
- Apply tricks relates to node_modules to acheive both host and container have their versions without conflicts.
- Use volumes to mount the source codes, in addition to use (nodemon) on container, that makes it simple for container app to restart upon on any code change.
- Use environment variables.
- Apply Health checkes concepts bared with depends on option to order the services and dependencies.