What you will learn
✓ Understand the purpose of Docker Compose
✓ Define application services in YAML
✓ Configure ports, volumes and networks
✓ Start and troubleshoot a multi-container stack
Sample architecture
User Browser
→Nginx
→Backend API
→PostgreSQL
Example docker-compose.yml
services:
frontend:
build: ./frontend
ports:
- "80:80"
backend:
build: ./backend
environment:
DATABASE_URL: postgresql://db:5432/skillops
db:
image: postgres:16-alpine
volumes:
- postgres_data:/var/lib/postgresql/data