Sign inSign up

a2coder/compviz

By a2coder

•Updated about 7 hours ago

Turn a Docker Compose file into an architecture diagram. Self-hosted web app with SVG, PNG and PDF.

Image
0

197

a2coder/compviz repository overview

⁠compviz

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⁠.

⁠Quick Start

docker run -d -p 3000:3000 --name compviz a2coder/compviz

Open http://localhost:3000⁠.

⁠Tags

TagSource
latestmain branch
canarycanary branch
nextnext branch
1.2.3, 1.2, 1Release tag v1.2.3

Every tag is built for linux/amd64 and linux/arm64.

⁠Docker Compose

services:
  compviz:
    image: a2coder/compviz:latest
    ports:
      - "3000:3000"
    restart: unless-stopped

⁠Environment Variables

VariableDefaultEffect
PORT3000Port the server listens on inside the container
COMPVIZ_API(unset)true turns on the POST /api/svg endpoint

⁠SVG API

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"
  • Body: the Compose file as raw YAML, up to 1MB.
  • Query: theme=dark for the dark palette (the default is light).
  • Response: 200 with image/svg+xml, a standalone SVG with the font embedded.
  • Errors: 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.

⁠Customising the Diagram

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.

⁠Image Details

  • Base: gcr.io/distroless/nodejs24-debian12:nonroot, with no shell or package manager.
  • Runs as the non-root user nonroot.
  • A standalone Next.js server, with no database and no external services.
  • No built-in HEALTHCHECK: the image has no shell or curl. Check GET / from your orchestrator instead.

Copyright © 2026 Arjun Palakkazhi. All rights reserved.

Tag summary

Content type

Image

Digest

sha256:22e3de95e…

Size

55.7 MB

Last updated

about 7 hours ago

docker pull a2coder/compviz