Docker Compose Profiles let you logically group services so you can run subsets of your stack with a single flag. Services without a profile run by default; services with a profile only start when explicitly requested via `--profile`. The post walks through a simple example adding an optional app container to an EventStoreDB setup, then shows a more advanced real-world configuration covering Postgres, EventStoreDB, Elasticsearch, Kafka, OpenTelemetry, and UI tools — all managed in one docker-compose.yml with profiles like `ci`, `all`, `all-no-ui`, and per-tool profiles. Key takeaway: profiles replace multiple separate compose files and make it easy to tailor environments for local dev, CI pipelines, or specific sample scenarios.

8m read timeFrom event-driven.io
Post cover image
Table of contents
What are Docker Compose Profiles?Docker Profiles advanced scenario