https://github.com/LironeFitoussi/microservices-docker

You’re handed a working microservices app that runs on your host machine. Your job: dockerize it from scratch, then evolve the setup through 7 milestones until you reach a production-grade, network-isolated, distroless deployment.

By the end you will have written, from scratch:


What you start with

.
├── README.md
├── LAB.md
├── frontend/
│   ├── nginx.conf
│   └── public/index.html
├── lb/
│   └── nginx.conf
└── services/
    ├── users-service/
    │   ├── server.js
    │   └── package.json
    └── products-service/
        ├── server.js
        └── package.json

No Dockerfile, no docker-compose.yml, no Docker anything. Just source code.


Milestone 0: Run it on the host (no Docker)

Goal: Confirm the app works before we add any complexity. If it doesn’t run here, no amount of Docker will fix it.

Steps

  1. Start MongoDB locally on port 27017. (Skip if it’s already running.)
  2. Install dependencies for both services: