{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreid6l2x7rtgnkl3y5ard5udsh3zmlszsyokhfevvr2dwkofcctmbwm",
"uri": "at://did:plc:5sgu76a53rz3n6unbykmovqy/app.bsky.feed.post/3mlogtv3m53e2"
},
"description": "Docker Compose is a tool for defining and running multi-container applications on a single host using a declarative YAML file. It is the standard way to spin up a local development environment with a database, a cache, the application server, and any other supporting services in one command.\n\n\nHow it works\n\nA docker-compose.yml (or compose.yaml) file declares services, networks, volumes, and configuration. Each service describes one container (image, command, ports, environment, volumes, depends",
"path": "/engineering-glossary/docker-compose-multi-container/",
"publishedAt": "2026-05-12T18:40:37.000Z",
"site": "https://sahilkapoor.com",
"tags": [
"Docker",
"Kubernetes",
"containerd",
"OCI"
],
"textContent": "**Docker Compose** is a tool for defining and running multi-container applications on a single host using a declarative YAML file. It is the standard way to spin up a local development environment with a database, a cache, the application server, and any other supporting services in one command.\n\n## How it works\n\nA `docker-compose.yml` (or `compose.yaml`) file declares services, networks, volumes, and configuration. Each **service** describes one container (image, command, ports, environment, volumes, depends_on, healthcheck). Running `docker compose up` pulls images, creates the declared resources, starts containers in dependency order, and streams logs to the terminal.\n\n## Common features\n\n * **Profiles.** Mark services as belonging to optional profiles, started only when explicitly requested.\n * **Environment files.** `.env` files supply variables for substitution in compose.yaml.\n * **Healthchecks and dependencies.** Wait for one service to be healthy before starting another.\n * **Override files.** Compose merges `compose.yaml` with `compose.override.yaml`, useful for per-developer customisation.\n * **Watch mode.** Live-rebuild services on file changes during development.\n\n\n\n## Compose vs Kubernetes\n\nCompose is for a single host and dev or simple staging environments. Kubernetes is for multi-host clusters in production. Compose specifications and Kubernetes manifests are not interchangeable but tools like Kompose can translate between them.\n\nš\n\n**Related Terms**\nDocker, Kubernetes, containerd, OCI.",
"title": "Docker Compose",
"updatedAt": "2026-05-13T19:14:45.908Z"
}