Managing multiple Micro-services in Development using Docker Compose

Part 1: The Problem

Any growing tech project, is usually accompanied by an ever growing number of micro services, and with it a growing number of problems.

Our Project Architecture

Part 2 Using Docker Compose

docker-compose up
GIF of Terminal
Service A is running smoothly
Service B is running smoothly
And So is Service C

Part 2.2 Understanding Service A and it Dependencies.

Part 3: Understanding docker-compose.yaml

A. Version

B. Services

C. Build

D. Dockerfile

E. ports

ports:
- "8080:3000"

F. Volumes

volumes:
- ./service_a:/myapp

G. depends_upon

depends_on:
- service_a_db
- service_a_redis
- service_b
- service_c
docker-compose up service_b

H. Environment Variables

environment:
MYSQL_ROOT_PASSWORD: service_a
MYSQL_DATABASE: "db"
MYSQL_USER: "user"
MYSQL_PASSWORD: "pass"

I. Network

Part 4: Conclusion.

Product Manager | Engineer | Educator | IIT | http://tushartuteja.com/