Simple generator of dependency graph based on depends_on
declarations in a docker-compose.yaml
. The yaml is parsed with js-yaml and the dependency graph is rendered with mermaid-cli.
The generator uses mermaid-cli and this needs to be installed and available in your PATH, see the project page for installation options but one way is:
npm install -g @mermaid-js/mermaid-cli
Install globally or in your project, to make it available globally:
npm install -g dcdg
> dcdg -i docker-compose.yaml -o dependency-graph.png
Feel free to contribute improvements if you like, the script was created to fullfill a specific need, it's unlikely that it works well with all docker-compose.yaml
variants.