Table of Contents
compose-viz
is a compose file visualization tool that follows compose-spec and allows you to gernerate graph in several formats.
If you are looking for a compose file vizualization tool, and you are using one of the compose-spec implementations (e.g. docker-compose/podman-compose), then compose-viz
is a great choice for you.
You need to install Graphviz to generate graphs.
pip install compose-viz
See releases.
This example yml is from docker compose beginner tutorial.
cd examples/voting-app/
# using python script
cpv -m svg docker-compose.yml
# using docker image
docker run --rm -it -v $(pwd):/in wst24365888/compose-viz -m svg docker-compose.yml
# using docker image in powershell
docker run --rm -it -v ${pwd}:/in wst24365888/compose-viz -m svg docker-compose.yml
And this is what the result looks like:
Check out the result here.
cpv [OPTIONS] INPUT_PATH
Option | Description |
---|---|
-o, --output-filename FILENAME |
Output filename for the generated visualization file. [default: compose-viz] |
-m, --format FORMAT |
Output format for the generated visualization file. See supported formats. [default: png] |
-r, --root-service SERVICE_NAME |
Root of the service tree (convenient for large compose yamls) |
-l, --legend |
Include a legend in the visualization. |
-p, --no-ports |
Don't show ports. |
-s, --simple |
Output a more simple graph with no image names and only basename of sources. |
-v, --version |
Show the version of compose-viz. |
--help |
Show help and exit. |
- Support more vizualization components.
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feat/amazing-feature
) - Commit your Changes with Conventional Commits
- Push to the Branch (
git push origin feat/amazing-feature
) - Open a Pull Request, please select the
dev
branch as the target branch.
Distributed under the MIT License. See LICENSE for more information.
- HSING-HAN, WU (Xyphuz)
- Mail me: [email protected]
- About me: https://www.xyphuz.com
- GitHub: https://github.com/wst24365888