Skip to content

Docker Compose

Also called Compose

What is 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.

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.

How it relates to Orbit

A project’s Servers tab can save and run a command such as `docker compose up` as its dev server. See Project Window for details.

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.

Related terms

Where this is taught

Going deeper