diff --git a/Readme.md b/Readme.md index e1a836a69eecd4c85b8750694b9d808d7b6a025d..bf139b24be8e53a98fba426e141084ce3b909e39 100644 --- a/Readme.md +++ b/Readme.md @@ -6,15 +6,20 @@ Base on [docker-compose-viz-mermaid](https://github.com/derlin/docker-compose-vi ``` +# Directly generate an image of with 1000px docker run --rm -it -v $PWD:/data dbeniamine/docker-compose-viz-mermaid -M -otest.png -M -w1000 +# Generate a svg with default parameters for mermaid and showing the ports docker run --rm -it -v $PWD:/data dbeniamine/docker-compose-viz-mermaid -v -p -m +# Generates the markdown sources with a mermaid block showing ports docker run --rm -it -v $PWD:/data dbeniamine/docker-compose-viz-mermaid -v -p -v -fMARKDOWN ``` -## snippet +## Configuration -Add the following to your `.bashrc` suits, to your needs +I recommand to use the `dcviz` command to call `docker-compose-viz-mermaid`, it parses a complex `docker-compose` configuration with `docker-compose config` before calling the visualization tool : + +To add the `dcviz` command, add the following code to your `.bashrc`, note that you can change the default arguments to suit your needs ```bash dcviz() { @@ -23,3 +28,5 @@ dcviz() { rm $$.yml > /dev/null 2>&1 } ``` + +Then you can simply run `dcviz -M -omyimage.png` to generate the image or `dcviz -v -fMARKDOWN` to get the markdown sources