From Single Containers to Microservice Architecture
Module 169 — Providing Services with Containers
gibb Bern • Platform Development • 2nd Year
Mario Iseli
Press Arrow Right to begin — or F for fullscreen
Imagine you have 5 services. Each needs its own docker run command:
Create networks, manage startup order, restart policies, volumes, environment variables... This doesn't scale.
Compose knows the desired state of your infrastructure. Declarative instead of imperative.
Docker Compose automatically creates a network. Services find each other by their name:
Compose automatically creates a network. All services can reach each other via their service name.
With custom networks you can isolate services. E.g. the reverse proxy shouldn't access the database directly.
When in doubt, follow the white rabbit.
Every tool has its place — from simple to enterprise:
One container, one service. Great for individual apps and first steps.
Multiple containers, single host. You are here! Perfect for dev & small deployments.
Multi-host cluster. Docker-native, but rarely used in practice today.
Production orchestration. Self-healing, scaling, rolling updates.
New developers run docker compose up and have the complete environment running in 2 minutes.
Tests run against real databases and services — identical to production, but isolated and reproducible.
Different services in different languages, connected through networks and message queues.
This presentation runs inside Docker Compose itself. 5 containers, one command. Meta enough? 😉
5 containers, 2 networks, 1 docker-compose.yml — everything you see right now:
┌──────────────────────────────────────────────────────────┐ │ Caddy (Reverse Proxy) — Port 80 │ │ Routes: /presentation/ /ingest/ /reader/ │ ├───────────────┬──────────────┬─────────────┬─────────────┤ │ Presentation │ Ingest │ Reader │ RabbitMQ │ │ Astro/nginx │ Node.js │ Node.js │ AMQP Broker │ │ Static Slides │ → publishes │ ← consumes │ Messages │ └───────────────┴──────┬────────┴──────┬───────┴─────────────┘ │ │ │ └────────┴──────┘ AMQP Queue
Login: student / m169StudenT
The docker-compose.yml of this project is intentionally heavily commented. Every line explains what it does and why.
Questions? Let's get hands-on.
Docs: docs.docker.com/compose
This presentation: built with Astro + Claude Code
Hosted in Docker Compose 🐳