| 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 |
| Marc Kupietz | 4d7cace | 2026-09-10 16:36:05 +0200 | [diff] [blame] | 28 | image: ${KALAMAR_IMAGE:-korap/kalamar:v0.66} |
| Marc Kupietz | 4f28dc4 | 2026-07-21 19:39:29 +0200 | [diff] [blame] | 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" |
| Marc Kupietz | 526c95f | 2026-09-13 16:41:19 +0200 | [diff] [blame] | 34 | # Let slow API requests (statistics over large virtual corpora) finish: |
| 35 | # the daemon otherwise drops the client after 30 s although its API |
| 36 | # user agent waits up to 120 s for Kustvakt. |
| 37 | MOJO_INACTIVITY_TIMEOUT: "130" |
| Marc Kupietz | 4f28dc4 | 2026-07-21 19:39:29 +0200 | [diff] [blame] | 38 | volumes: |
| 39 | - ${KALAMAR_INSTANCE_DIR}/kalamar.ids-mannheim.conf:/kalamar/kalamar.production.conf:ro |
| 40 | - ${KALAMAR_INSTANCE_DIR}/templates/custom:/kalamar/templates/custom:ro |
| Marc Kupietz | 4d7cace | 2026-09-10 16:36:05 +0200 | [diff] [blame] | 41 | # Documentation menu: puts the corpus section first. Mounted over the |
| 42 | # navigation Kalamar ships, so it has to be kept in sync with it. |
| 43 | - ${KALAMAR_INSTANCE_DIR}/templates/doc/navigation.json:/kalamar/templates/doc/navigation.json:ro |
| Marc Kupietz | 4f28dc4 | 2026-07-21 19:39:29 +0200 | [diff] [blame] | 44 | - ${KALAMAR_INSTANCE_DIR}/default.plugins.json:/kalamar/default.plugins.json:ro |
| 45 | - ${KALAMAR_INSTANCE_DIR}/public/robots.txt:/kalamar/public/robots.txt:ro |