Closed Damounet closed 3 months ago
We run our own Kroki server and Backstage. Diagrams from external PlantUML files get included like this in a TechDocs page:
# Architecture overview
```kroki-plantuml
@from_file:diagrams/architecture_overview.puml
This is the directory structure:
```plaintext
docs/diagrams
└── architecture_overview.puml
PlantUML file contents:
@startuml Architecture Overview
!include C4_Container.puml
LAYOUT_TOP_DOWN()
LAYOUT_WITH_LEGEND()
etc.
Needs a bit of crafting but it works.
I would rather prefer a solution where the image is generated at the doc build time but this will be enough for the moment !
Thanks @pwalleni
I am running Backstage and work with plantUML files, that I want to include in a markdown file, and it does not work.
My setup is as follows:
my MinIO has the following files:
We can see that the index is generated and that the puml file is still here.
The Dockerfile of the my Backstage App contains:
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \ apt-get update && \ apt-get install -y python3 g++ build-essential python3-pip python3-venv graphviz openjdk-17-jdk ADD --chown=node:node https://github.com/plantuml/plantuml/releases/download/v1.2024.3/plantuml-1.2024.3.jar /opt/plantuml.jar RUN echo '#!/usr/bin/sh\n\njava -Djava.awt.headless=true -jar '/opt/plantuml.jar ' ${@}' > /usr/local/bin/plantuml && \ chmod +x /usr/local/bin/plantuml && \ yarn config set python /usr/bin/python3
ENV VIRTUAL_ENV=/opt/venv RUN python3 -m venv "$VIRTUAL_ENV" ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN pip3 install mkdocs mkdocs-techdocs-core
[...]