| Marc Kupietz | 4f28dc4 | 2026-07-21 19:39:29 +0200 | [diff] [blame] | 1 | # Compose overlay that grafts this Kalamar instance's customizations onto the |
| 2 | # stock `kalamar` service of KorAP-Docker's compose.yaml, so the instance can |
| 3 | # be tested locally without changing either the KorAP-Docker or the |
| 4 | # KorAP-Ingestion project. |
| 5 | # |
| 6 | # It is meant to be *layered on top of* the base compose, e.g.: |
| 7 | # |
| 8 | # docker compose -f <base-compose> -f compose.instance.yaml up |
| 9 | # |
| 10 | # Requirements: |
| 11 | # * KALAMAR_INSTANCE_DIR must be the ABSOLUTE path to this checkout. |
| 12 | # Relative bind-mount paths in a compose override resolve against the |
| 13 | # project directory (the first -f / the cwd), not against this file, so |
| 14 | # the mounts below go through an absolute env var instead. |
| 15 | # |
| 16 | # KorAP-Ingestion wires this up automatically; see its `korap` target and pass |
| 17 | # make korap KALAMAR_INSTANCE=../Kalamar-Instance-IDS |
| 18 | # |
| 19 | # Keep the mount list in sync with what a real deployment overlays (compare the |
| 20 | # `deliko-*-compose.yml` files in the sibling DeLiKo instance). |
| 21 | services: |
| 22 | kalamar: |
| 23 | # This instance serves its corpus release log as Markdown (*.html.md), |
| 24 | # which needs a Kalamar with the Markdown renderer (>= v0.66). The base |
| 25 | # compose pins an older image, so override it here. Point KALAMAR_IMAGE at |
| 26 | # a locally built tag when testing renderer changes: |
| 27 | # make korap KALAMAR_INSTANCE=../Kalamar-Instance-IDS KALAMAR_IMAGE=korap/kalamar:v0.66-alpha-large |
| 28 | image: ${KALAMAR_IMAGE:-korap/kalamar:v0.66-alpha} |
| 29 | environment: |
| 30 | # Use this instance's config verbatim: skip the export-plugin entrypoint |
| 31 | # hack, which rewrites /kalamar/kalamar.production.conf in place and would |
| 32 | # fight the read-only mount below. |
| 33 | KALAMAR_EXPORT: "false" |
| 34 | volumes: |
| 35 | - ${KALAMAR_INSTANCE_DIR}/kalamar.ids-mannheim.conf:/kalamar/kalamar.production.conf:ro |
| 36 | - ${KALAMAR_INSTANCE_DIR}/templates/custom:/kalamar/templates/custom:ro |
| 37 | - ${KALAMAR_INSTANCE_DIR}/default.plugins.json:/kalamar/default.plugins.json:ro |
| 38 | - ${KALAMAR_INSTANCE_DIR}/public/robots.txt:/kalamar/public/robots.txt:ro |