Skip to content
yutils
Example

Input (docker-compose.yml)

services:
  web:
    image: nginx
    depends_on: [api]
    networks: [frontend]
  api:
    build: ./api
    depends_on: [db]
    networks: [frontend, backend]
  db:
    image: postgres:16
    volumes:
      - db-data:/var/lib/postgresql/data
    networks: [backend]
networks:
  frontend:
  backend:
volumes:
  db-data:

Result

6 resources, 5 relationships.
- web → api (depends_on)
- api → db (depends_on)
- frontend → web/api (network)
- backend → api/db (network)
- db → db-data (volume)

Note

depends_on edges are dashed because they're intra-column (service ↔ service). Only top-level networks / volumes / configs / secrets appear as graph nodes. Bind mounts (./local:/path) are excluded.

Usage / FAQ

When to use this

  • PR review — verify the structure of a new docker-compose.yml at a glance
  • Onboarding — explain the local dev stack to new engineers visually
  • Debugging — quickly find depends_on cycles, missing networks, structural issues
  • Compose → K8s migration — map structure before rewriting (pair tool: Kubernetes Visualizer)
  • Demo to ops — surface external dependencies (networks/volumes/secrets) clearly

FAQ

Q.Which Compose versions are supported?
A.Compose v2/v3+ (current standard). Recognizes services / networks / volumes / configs / secrets top-level keys. Compose v1 (services at top level) is not supported — deprecated since 2018.
Q.Why aren't bind mounts shown in the graph?
A.Bind mounts like ./local:/path depend on the host filesystem; they're not Compose-managed resources. The graph shows named volumes that Compose manages directly — the core assets when migrating or porting environments.
Q.Are Swarm configs and secrets supported?
A.Yes. Top-level configs and secrets referenced by services appear as graph nodes with edges. Even outside Swarm mode, some tools (Podman, Kubernetes conversion) use the same spec.
Fun facts
  • Docker Compose's predecessor was Fig (2014, Orchard Labs). Docker Inc. acquired Orchard in 2014 and absorbed Fig as docker-compose. The fig.yml → docker-compose.yml filename change is the residue.

    Docker — Orchard acquisition
  • Compose v1 (Python) ran 2014-2024. v2 (2021+) is rewritten in Go and integrated as a Docker CLI plugin — that's why the command changed from 'docker-compose' (hyphen) to 'docker compose' (space). v1 reached EOL in 2024.

    Compose v2 migration guide
  • The Compose Spec was jointly standardized in 2020 by Docker / Microsoft / AWS / Mirantis. Other tools (Podman Compose, Kompose → Kubernetes converter) also implement it — docker-compose.yml is the de-facto lingua franca for container orchestration.

    Compose Spec