Docker Compose
A tool used to define and run multi-container Docker applications using a single YAML file, simplifying the orchestration of complex local environments.
What it is
While Docker runs a single container, modern apps often require multiple interacting services (e.g., a web server, a database, and a caching layer). Docker Compose allows you to define all these interconnected services, their ports, and their shared volumes in a docker-compose.yml file, and start them all simultaneously with a single command.
When you would use it
You use Docker Compose when developing an application locally that depends on several distinct services, ensuring you don't have to manually start and connect multiple Docker containers.
Common operations
- Spinning up a local development environment with a Node API, Postgres database, and Redis cache instantly.
- Tearing down and resetting local testing databases cleanly.