
Docker Compose Has a Free Orchestration Tool: Define Multi-Container Apps in One YAML File
Your app needs PostgreSQL, Redis, a Node.js API, and a React frontend. You open 4 terminal tabs, start each service manually, configure networking between them, and pray nothing crashes. What if one command started your entire stack — databases, services, networking — from a single config file? That's Docker Compose. Quick Start # docker-compose.yml services : api : build : ./api ports : - " 3000:3000" environment : DATABASE_URL : postgres://postgres:secret@db:5432/myapp REDIS_URL : redis://cache:6379 depends_on : db : condition : service_healthy cache : condition : service_started volumes : - ./api/src:/app/src # Hot reload in development web : build : ./web ports : - " 5173:5173" environment : VITE_API_URL : http://localhost:3000 db : image : postgres:16 environment : POSTGRES_PASSWORD : secret POSTGRES_DB : myapp volumes : - pgdata:/var/lib/postgresql/data healthcheck : test : [ " CMD-SHELL" , " pg_isready -U postgres" ] interval : 5s timeout : 5s retries : 5 cache : image : redis:7
Continue reading on Dev.to Webdev
Opens in a new tab



