@inditextech/docouture-antora-extensions 0.1.0-SNAPSHOT.40.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,72 @@
1
+ # GH-44: default Kroki (https://kroki.io) container definitions —
2
+ # `kroki-prewarm.js` starts these automatically (`docker compose -f
3
+ # <this file> up -d`) the first time a `kroki-enabled: true` build needs a
4
+ # diagram rendered and finds nothing already listening at the fixed local
5
+ # URL `@inditextech/docouture-asciidoc-extensions/lib/kroki-config.js` hardcodes.
6
+ # There is no teardown: containers are left running after the build, reused
7
+ # by the next one (a fast reachability check skips straight past this file
8
+ # when Kroki is already up), and simply discarded whenever the machine or CI
9
+ # runner they ran on goes away.
10
+ #
11
+ # CUSTOMIZING THIS: run `docouture eject kroki` to copy this exact file to
12
+ # docs/kroki-compose.yml in your own site's repository — kroki-prewarm.js
13
+ # prefers that copy over this bundled default whenever one exists, so you
14
+ # can add companions for other diagram types, pin different image versions,
15
+ # or add whatever else your environment needs, without forking this package.
16
+ #
17
+ # `mermaid`, `bpmn` and `excalidraw` are the three SUPPORTED_TYPES entries
18
+ # (see kroki-config.js) that need a headless-Chrome/JS environment of their
19
+ # own to lay a diagram out — Kroki's own catalogue, not something specific
20
+ # to this package (verified against the real yuzutech/kroki-{mermaid,bpmn,
21
+ # excalidraw} images: each is a Node+Puppeteer service listening on its own
22
+ # fixed port — 8002, 8003, 8004 respectively — that Kroki's core service
23
+ # reaches for by that exact port whenever `KROKI_<TYPE>_HOST` names a
24
+ # reachable host, regardless of what `expose:` claims; get the port wrong
25
+ # for one of these three and Kroki's core container fails that diagram type
26
+ # with a "Connection refused" to whatever port IT expected, not the one the
27
+ # companion's container actually listens on — this bit us once already,
28
+ # assigning excalidraw the bpmn port). Every other supported type
29
+ # (plantuml, graphviz, ditaa, ...) is rendered by the `kroki` service alone,
30
+ # no headless browser involved. Widening `kroki-diagram-types` to one of
31
+ # those needs no compose change; a future SUPPORTED_TYPES entry that also
32
+ # needs its own companion means ejecting this file (`docouture eject kroki`)
33
+ # and adding it here the same way — check the new companion image's own
34
+ # actual listening port first (`docker exec <container> netstat -tlnp`),
35
+ # don't assume it from an adjacent one.
36
+ # Images are pinned by digest, not `:latest` — this makes the image set
37
+ # reproducible (a rebuild months later pulls the exact same bits) and lets CI
38
+ # cache the pulled layers keyed on this file's own contents (see
39
+ # .github/workflows/*.yml's "Kroki docker image cache" step): a cache key
40
+ # derived from a `:latest` tag would never invalidate when upstream actually
41
+ # moves, silently serving a stale image forever. Bump these deliberately —
42
+ # `docker pull yuzutech/kroki:latest && docker inspect --format='{{index
43
+ # .RepoDigests 0}}' yuzutech/kroki:latest` (same for the other three) — not
44
+ # as a side effect of some automated tool touching `:latest` for you.
45
+ services:
46
+ kroki:
47
+ image: yuzutech/kroki@sha256:6980bfb218b48b74ea14b888d9c7e8c032d1cb6325f3292277abdf62483abd9d
48
+ ports:
49
+ - '8500:8000'
50
+ environment:
51
+ KROKI_MERMAID_HOST: mermaid
52
+ KROKI_BPMN_HOST: bpmn
53
+ KROKI_EXCALIDRAW_HOST: excalidraw
54
+ depends_on:
55
+ - mermaid
56
+ - bpmn
57
+ - excalidraw
58
+
59
+ mermaid:
60
+ image: yuzutech/kroki-mermaid@sha256:ad6721646aabfb8b5f5005db2daa6e37189c25e18aab19a8ef8590b6171cd192
61
+ expose:
62
+ - '8002'
63
+
64
+ bpmn:
65
+ image: yuzutech/kroki-bpmn@sha256:1558692f39cbede20f70f732d34c906dde7a3333e004f55dc66ea8fbfc3e7d70
66
+ expose:
67
+ - '8003'
68
+
69
+ excalidraw:
70
+ image: yuzutech/kroki-excalidraw@sha256:214f13c1cd3c3f79a18a83631a900fedbed71b2f39d3a0c5630ac5fa5ad40046
71
+ expose:
72
+ - '8004'