Docker Compose Profiles, one the most useful and underrated features
This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).
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.