Giter Site home page Giter Site logo

funkwerk / compose_plantuml Goto Github PK

View Code? Open in Web Editor NEW
89.0 10.0 8.0 33 KB

Generate Plantuml graphs from docker-compose files

License: MIT License

Ruby 3.92% Python 58.91% Gherkin 34.90% Dockerfile 2.27%
docker compose docker-compose plantuml model

compose_plantuml's Introduction

Build Status PyPi downloads PyPi version Docker pulls

compose_plantuml

Generate Plantuml graphs from docker-compose files

Note that version 2 as well as the legacy version is supported.

Usage

Via Python

Install it via: pip3 install compose_plantuml

After that use it like: compose_plantuml --link-graph docker-compose.yml

Via Docker

Use it like: cat docker-compose.yml | docker run -i funkwerk/compose_plantuml --link-graph

For SVG Output, just call:

cat docker-compose.yml | docker run -i funkwerk/compose_plantuml --link-graph | docker run -i think/plantuml > output.svg

For PNG Output, just call:

cat docker-compose.yml | docker run -i funkwerk/compose_plantuml --link-graph | docker run -i think/plantuml -tpng > output.png

Link Graph

Link Graphs provide an overview over docker-compose services.

Consider the following docker-compose.yml

version: '2'
services:
  first:
    links:
      - second
  second: {}

When calling 'compose_plantuml docker-compose.yml' it will generate the following link graph:

[first]
[second]
[first] --> [second]

Rendered it looks like:

Boundaries

Boundaries visualize the external boundaries a system has.

Consider the following docker-compose.yml

version: '2'
services:
  service:
    ports:
      - 8080:80

When calling 'compose_plantuml --boundaries docker-compose.yml' it will generate the following plantuml:

rectangle system {
  [service]
}
[service] --> 8080 : 80

Rendered it looks like:

Related Links

compose_plantuml's People

Contributors

lindt avatar lrkwz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

compose_plantuml's Issues

support for "networks"

docker-compose supports a feature called "network" which groups together containers. This is the replacement for the now-obsolete "links".
It would be fantastic if nodes can be grouped together by network.
Regards

[BUG]The PNG is not complete if the docker-compose contains a lot of containers

Hi,
I tried your project with 3 methods.

  1. cat docker-compose.yml | docker run -i funkwerk/compose_plantuml --link-graph | docker run -i think/plantuml -tpng > output.png who worked as expected

Then I see that we can display the volumes and the containers so I tried:
2) cat docker-compose.yml | docker run -i funkwerk/compose_plantuml --boundaries | docker run -i think/plantuml > output.svg who is complet when I open it

  1. cat docker-compose.yml | docker run -i funkwerk/compose_plantuml --boundaries | docker run -i think/plantuml -tpng > output.png and here, the PNG doesn't contains all the containers, it's cut on the right...

Do you know why this happens ?

I want to display the graph as in the first try ("normal view") but with "volumes,ports", is it possible ? (I mean to have the "depends on" + "volumes and ports" ?)

Thank you for your amazing project !

How to avoid a "spam" of containers ?

Hi,
I'd like to know if there is a way to delete the container that the command cat docker-compose.yml | docker run -i funkwerk/compose_plantuml --link-graph | docker run -i think/plantuml > output.svg creates because each time it creates 2 containers.

Thank you for the help :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.