Turn a Docker Compose file into an architecture diagram. Self-hosted web app with SVG, PNG and PDF.
197
Turn a Docker Compose file into an architecture diagram. Paste a compose.yaml, and compviz draws each service as a node and each dependency as an edge. You can pan and zoom the preview and export it as SVG, PNG or PDF.
This image runs your own copy of compviz.a2coder.dev. Source and docs: github.com/a2-coder/compviz.
docker run -d -p 3000:3000 --name compviz a2coder/compviz
Open http://localhost:3000.
| Tag | Source |
|---|---|
latest | main branch |
canary | canary branch |
next | next branch |
1.2.3, 1.2, 1 | Release tag v1.2.3 |
Every tag is built for linux/amd64 and linux/arm64.
services:
compviz:
image: a2coder/compviz:latest
ports:
- "3000:3000"
restart: unless-stopped
| Variable | Default | Effect |
|---|---|---|
PORT | 3000 | Port the server listens on inside the container |
COMPVIZ_API | (unset) | true turns on the POST /api/svg endpoint |
Set COMPVIZ_API=true to generate diagrams from scripts or CI:
docker run -d -p 3000:3000 -e COMPVIZ_API=true a2coder/compviz
curl --fail --data-binary @compose.yaml -o diagram.svg http://localhost:3000/api/svg
curl --fail --data-binary @compose.yaml -o diagram-dark.svg "http://localhost:3000/api/svg?theme=dark"
theme=dark for the dark palette (the default is light).200 with image/svg+xml, a standalone SVG with the font embedded.400 the YAML doesn't parse or has no services, 404 the API is off, 405 method isn't POST, 413 body is over 1MB.The endpoint has no authentication or rate limiting. If you expose it publicly, put it behind a proxy that adds them.
Settings live inside the Compose file, so it still runs with docker compose:
x-compviz:
title: Storefront
direction: LR # TB (default), LR, RL, BT
services:
api:
build: ./api
depends_on: [db]
labels:
compviz.name: Orders API
compviz.highlight: "true"
compviz.edge.db.label: SQL
db:
image: postgres:16-alpine
See the README for every compviz.* label.
gcr.io/distroless/nodejs24-debian12:nonroot, with no shell or package manager.nonroot.HEALTHCHECK: the image has no shell or curl. Check GET / from your orchestrator instead.Copyright © 2026 Arjun Palakkazhi. All rights reserved.
Content type
Image
Digest
sha256:22e3de95e…
Size
55.7 MB
Last updated
about 7 hours ago
docker pull a2coder/compviz