What is Docker Compose?

Turkish: Docker Compose

Docker Compose defines multiple containers in one YAML file so local development and test environments can run as a coordinated stack.

What is Docker Compose?

Docker Compose describes a multi-container application in a single compose.yml file. A web server, database, cache, worker, and message broker can be started together with one command, sharing predictable networks, volumes, ports, and environment variables.

How Does It Work?

Each service in the Compose file declares an image or build context, port mappings, volumes, environment values, and dependencies. docker compose up reads that definition, builds or pulls images, connects containers to the same project network, and streams logs together.

depends_on controls startup order, not full readiness. If a test suite needs PostgreSQL to be ready before migrations run, healthchecks, retries, or explicit wait steps are still needed.

Where Is It Used?

  • Running the same local stack across a development team
  • Starting databases or caches inside CI integration tests
  • Preparing demo and prototype environments quickly
  • Versioning side services such as PostgreSQL, Redis, or Elasticsearch

Relationship with Docker and Kubernetes

Docker packages and runs individual containers; Docker Compose coordinates a small set of containers for one project. Kubernetes is usually used for production-scale scheduling, self-healing, service discovery, and rolling deployments.

A good Compose file helps a new developer start the project reliably and reduces environment drift. It should still be treated as a development and test convenience unless the production architecture has been designed around it.