fix(infra): bake config into images so compose-smoke passes on CI (refs #30)
Some checks failed
CI / lint (pull_request) Successful in 50s
CI / build (pull_request) Successful in 40s
CI / unit (pull_request) Successful in 45s
CI / compose-smoke (pull_request) Failing after 3m31s

Root cause of the compose-smoke failure (found in the runner logs):

  oz-init-1 | CommandError: Yaml file
              `/app/setup_configuration/data.yaml` does not exist.

The ubuntu-latest runner runs the job inside a container, so
`docker compose up` starts the stack as SIBLING containers via the host
daemon. A relative bind mount (./openzaak/setup_configuration) resolves to
a path inside the job container that the daemon can't see, so Docker mounts
an empty dir and the init container can't find data.yaml. The same trap hit
nrc-init (data.yaml), flowable-init (the BPMN) and keycloak (realm import).

Fix: bake the assets into small derived images instead of bind-mounting:
  - infra/openzaak/Dockerfile        -> register-referentie/openzaak:dev
  - infra/opennotificaties/Dockerfile-> register-referentie/opennotificaties:dev
  - infra/keycloak/Dockerfile        -> register-referentie/keycloak:dev
  - flowable-init: build.dockerfile_inline bakes workflows/registratie.bpmn

Base versions stay build args (OPENZAAK_TAG / OPENNOTIFICATIES_TAG), so the
pinning is unchanged. Applied to both the consolidated compose and the
per-service composes, so local Podman and CI use one mechanism — no bind
mounts, no SELinux `:z`, no world-readable requirement.

Verified locally: `podman build` of the OpenZaak and BPMN images produces
the file at the expected in-container path.

Docs: docs/runbooks/gitea-actions-gotchas.md explains the DinD bind-mount
trap and the bake fix; openzaak.md and ci.md point at it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-24 13:06:56 +02:00
parent 88de47d1bb
commit 9ff7937055
11 changed files with 185 additions and 37 deletions

12
infra/openzaak/Dockerfile Normal file
View File

@@ -0,0 +1,12 @@
# Derived OpenZaak image with the setup_configuration YAML baked in.
#
# Why bake instead of bind-mount: Gitea's containerized `ubuntu-latest` runner
# runs the job inside a container, so `docker compose` starts the stack as
# SIBLING containers via the host daemon. A bind mount of a workspace path is
# then resolved on the daemon host (where it does not exist), and Docker mounts
# an empty directory — oz-init would not find data.yaml and exits 1. Baking the
# file into the image makes it present regardless of runtime (local Podman or
# CI Docker-in-Docker). See docs/runbooks/gitea-actions-gotchas.md.
ARG OPENZAAK_TAG=1.28.2
FROM docker.io/openzaak/open-zaak:${OPENZAAK_TAG}
COPY setup_configuration /app/setup_configuration