All Projects → pmsipilot → Docker Compose Viz

pmsipilot / Docker Compose Viz

Licence: mit
Docker compose graph visualization

Projects that are alternatives of or similar to Docker Compose Viz

GiGraph
Simple yet versatile library for generating graphs in the DOT language
Stars: ✭ 25 (-93.39%)
Mutual labels:  graphviz
Graphviz Visual Editor
A web application for interactive visual editing of Graphviz graphs described in the DOT language.
Stars: ✭ 261 (-30.95%)
Mutual labels:  graphviz
Graph Viz D3 Js
Graphviz web D3.js renderer
Stars: ✭ 297 (-21.43%)
Mutual labels:  graphviz
setup-graphviz
▶️ GitHub Action to set up Graphviz cross-platform(Linux, macOS, Windows).
Stars: ✭ 20 (-94.71%)
Mutual labels:  graphviz
graphviz-react
React component for displaying Graphviz graphs
Stars: ✭ 65 (-82.8%)
Mutual labels:  graphviz
Octopus
🐙 Octopus - Internal wiki with diagrams for software and product teams
Stars: ✭ 274 (-27.51%)
Mutual labels:  graphviz
pathway-mapper
PathwayMapper: An interactive and collaborative graphical curation tool for cancer pathways
Stars: ✭ 47 (-87.57%)
Mutual labels:  graphviz
Viz.js
A hack to put Graphviz on the web.
Stars: ✭ 3,602 (+852.91%)
Mutual labels:  graphviz
vscode-graphviz
This extension provides GraphViz (dot) language support for VS Code.
Stars: ✭ 21 (-94.44%)
Mutual labels:  graphviz
Rback
RBAC in Kubernetes visualizer
Stars: ✭ 285 (-24.6%)
Mutual labels:  graphviz
alphasql
AlphaSQL provides Integrated Type and Schema Check and Parallelization for SQL file set mainly for BigQuery
Stars: ✭ 35 (-90.74%)
Mutual labels:  graphviz
poddotify
A command line tool: from a Podfile.lock to an image.
Stars: ✭ 79 (-79.1%)
Mutual labels:  graphviz
Phpdocumentor
Documentation Generator for PHP
Stars: ✭ 3,341 (+783.86%)
Mutual labels:  graphviz
craftql
A CLI tool to visualize GraphQL schemas and to output a graph data structure as a graphviz .dot format
Stars: ✭ 75 (-80.16%)
Mutual labels:  graphviz
Go Callvis
Visualize call graph of a Go program using Graphviz
Stars: ✭ 3,692 (+876.72%)
Mutual labels:  graphviz
state machines-graphviz
Graphviz module for state machines
Stars: ✭ 27 (-92.86%)
Mutual labels:  graphviz
Go Erd
Go-ERD (Entity Relationship Diagrams) for Golang with Graphviz [WIP]
Stars: ✭ 271 (-28.31%)
Mutual labels:  graphviz
Modgv
Converts 'go mod graph' output into Graphviz's DOT language
Stars: ✭ 358 (-5.29%)
Mutual labels:  graphviz
Liandi
📕 一款桌面端的 Markdown 块级引用和双向链接笔记应用,支持 Windows、Mac 和 Linux。A desktop Markdown Block-Reference and Bidirectional-Link note-taking application, supports Windows, Mac and Linux.
Stars: ✭ 354 (-6.35%)
Mutual labels:  graphviz
Kingraph
Plots family trees using JavaScript and Graphviz
Stars: ✭ 285 (-24.6%)
Mutual labels:  graphviz

docker-compose-viz

Average time to resolve an issue Percentage of issues still open Docker Stars Docker Pulls

How to use

Docker

Considering the current working directory is where your docker-compose.yml file is located:

docker run --rm -it --name dcv -v $(pwd):/input pmsipilot/docker-compose-viz render -m image docker-compose.yml

# PowerShell
docker run --rm -it --name dcv -v ${pwd}:/input pmsipilot/docker-compose-viz render -m image docker-compose.yml

This will generate the docker-compose.png file in the current working directory.

PHP

Before you start, make sure you have:

  • Composer installed,
  • PHP 7.2 (at least) installed,
  • GraphViz installed (see below for a guide on how to install it)
git clone https://github.com/pmsipilot/docker-compose-viz.git

make vendor
# Or
composer install --prefer-dist 

bin/dcv

Install GraphViz

  • On MacOS: brew install graphviz
  • On Debian: sudo apt-get install graphviz

Usage

Usage:
  render [options] [--] [<input-file>]

Arguments:
  input-file                         Path to a docker compose file [default: "./docker-compose.yml"]

Options:
      --override=OVERRIDE            Tag of the override file to use [default: "override"]
  -o, --output-file=OUTPUT-FILE      Path to a output file (Only for "dot" and "image" output format) [default: "./docker-compose.dot" or "./docker-compose.png"]
  -m, --output-format=OUTPUT-FORMAT  Output format (one of: "dot", "image", "display") [default: "display"]
      --only=ONLY                    Display a graph only for a given services (multiple values allowed)
  -f, --force                        Overwrites output file if it already exists
      --no-volumes                   Do not display volumes
  -r, --horizontal                   Display a horizontal graph
      --ignore-override              Ignore override file

How to read the graph

Links

Links (from services.<service>.links) are displayed as plain arrows pointing to the service that declares the link:

links

If we look at the link between mysql and ambassador, it reads as follow: "mysql is known as mysql in ambassador." If we look at the link between ambassador and logs, it reads as follow: "ambassador is known as logstash in logs."

External links are displayed using the same shapes but are grayed:

external_links

Volumes

Volumes (from services.<service>.volumes_from) are displayed as dashed arrows pointing to the service that uses the volumes:

volumes

If we look at the link between logs and api, it reads as follow: "api uses volumes from logs."

Volumes (from services.<service>.volumes) are displayed as folders with the host directory as label and are linked to the service that uses them dashed arrows.

If we look at the link between ./api and api, it reads as follow: "the host directory ./apiis mounted as a read-write folder on /src in api." Bidirectional arrows mean the directory is writable from the container.

If we look at the link between ./etc/api/php-fpm.d and api, it reads as follow: "the host directory ./etc/api/php-fpm.dis mounted as a read-only folder on /usr/local/etc/php-fpm.d in api." Unidirectional arrows mean the directory is not writable from the container.

Dependencies

Dependencies (from services.<service>.depends_on) are displayed as dotted arrows pointing to the service that declares the dependencies:

dependencies

If we look at the link between mysql and logs, it reads as follow: "mysql depends on logs."

Ports

Ports (from services.<service>.ports) are displayed as circle and are linked to containers using plain arrows pointing to the service that declares the ports:

ports

If we look at the link between port 2480 and orientdb, it reads as follow: "traffic coming to host port 2480 will be routed to port 2480 of orientdb." If we look at the link between port 2580 and elk, it reads as follow: "traffix coming to host port 2580 will be routed to port 80 of elk."

Extends

Extended services (from services.<service>.extends) are displayed as components (just like normal services). The links between them and the extending services are displayed as inverted arrows:

extends

If we look at the link between mysql and db, it reads as follow: "mysql extends service db".

Networks

Networks (from networks.<network>) are displayed as pentagons. The links between them and services are displayed as plain arrows pointing to the network:

networks

If we look at the link between mysql and the global network, it reads as follow: "mysql is known as mysql, db and reldb in the global network.

The legacy network is an external so it's displayed as a grayed pentagone.

Examples

dot renderer

digraph G {
  graph [pad=0.5]
  "front" [shape="component"]
  "http" [shape="component"]
  2380 [shape="circle"]
  "ambassador" [shape="component"]
  "mysql" [shape="component"]
  "orientdb" [shape="component"]
  "elk" [shape="component"]
  "api" [shape="component"]
  "piwik" [shape="component"]
  "logs" [shape="component"]
  "html" [shape="component"]
  2580 [shape="circle"]
  2480 [shape="circle"]
  "http" -> "front" [style="solid"]
  2380 -> "front" [style="solid" label=80]
  "mysql" -> "ambassador" [style="solid"]
  "orientdb" -> "ambassador" [style="solid"]
  "elk" -> "ambassador" [style="solid"]
  "api" -> "http" [style="solid"]
  "piwik" -> "http" [style="solid"]
  "logs" -> "http" [style="dashed"]
  "piwik" -> "http" [style="dashed"]
  "html" -> "http" [style="dashed"]
  "ambassador" -> "api" [style="solid" label="graphdb"]
  "ambassador" -> "api" [style="solid" label="reldb"]
  "logs" -> "api" [style="dashed"]
  "ambassador" -> "logs" [style="solid" label="logstash"]
  2580 -> "elk" [style="solid" label=80]
  "ambassador" -> "piwik" [style="solid" label="db"]
  2480 -> "orientdb" [style="solid"]
}

image renderer

image renderer

display renderer

display renderer

Troubleshooting

Getting "failed to open stream: Permission denied"?

Make sure the target directory is writeable by the user in the Docker container. Or create a writeable directory first. See workaround #41

License

The MIT License (MIT) Copyright ® 2020 PMSIpilot

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].