fix(infra): bake config into images so compose-smoke passes on CI (refs #30)
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:
@@ -47,7 +47,12 @@ services:
|
||||
networks: [cg]
|
||||
|
||||
oz-init:
|
||||
image: docker.io/openzaak/open-zaak:${OPENZAAK_TAG:-1.28.2}
|
||||
build:
|
||||
context: ./openzaak
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
OPENZAAK_TAG: ${OPENZAAK_TAG:-1.28.2}
|
||||
image: register-referentie/openzaak:dev
|
||||
environment: &oz-env
|
||||
DJANGO_SETTINGS_MODULE: openzaak.conf.docker
|
||||
SECRET_KEY: ${OZ_SECRET_KEY:-dev-only-not-for-production}
|
||||
@@ -68,8 +73,6 @@ services:
|
||||
OPENZAAK_SUPERUSER_EMAIL: admin@localhost
|
||||
RUN_SETUP_CONFIG: "true"
|
||||
command: /setup_configuration.sh
|
||||
volumes:
|
||||
- ./openzaak/setup_configuration:/app/setup_configuration:ro
|
||||
depends_on:
|
||||
oz-db:
|
||||
condition: service_healthy
|
||||
@@ -78,7 +81,7 @@ services:
|
||||
networks: [cg]
|
||||
|
||||
openzaak:
|
||||
image: docker.io/openzaak/open-zaak:${OPENZAAK_TAG:-1.28.2}
|
||||
image: register-referentie/openzaak:dev
|
||||
environment: *oz-env
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "-c", "import requests,sys; sys.exit(0 if requests.head('http://localhost:8000/admin/').status_code in (200,302) else 1)"]
|
||||
@@ -94,7 +97,7 @@ services:
|
||||
networks: [cg]
|
||||
|
||||
oz-celery:
|
||||
image: docker.io/openzaak/open-zaak:${OPENZAAK_TAG:-1.28.2}
|
||||
image: register-referentie/openzaak:dev
|
||||
environment: *oz-env
|
||||
command: /celery_worker.sh
|
||||
depends_on:
|
||||
@@ -124,7 +127,12 @@ services:
|
||||
networks: [cg]
|
||||
|
||||
nrc-init:
|
||||
image: docker.io/openzaak/open-notificaties:${OPENNOTIFICATIES_TAG:-1.16.1}
|
||||
build:
|
||||
context: ./opennotificaties
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
OPENNOTIFICATIES_TAG: ${OPENNOTIFICATIES_TAG:-1.16.1}
|
||||
image: register-referentie/opennotificaties:dev
|
||||
environment: &nrc-env
|
||||
DJANGO_SETTINGS_MODULE: nrc.conf.docker
|
||||
SECRET_KEY: ${NRC_SECRET_KEY:-dev-only-not-for-production}
|
||||
@@ -144,8 +152,6 @@ services:
|
||||
OPENNOTIFICATIES_SUPERUSER_EMAIL: admin@localhost
|
||||
RUN_SETUP_CONFIG: "true"
|
||||
command: /setup_configuration.sh
|
||||
volumes:
|
||||
- ./opennotificaties/setup_configuration:/app/setup_configuration:ro
|
||||
depends_on:
|
||||
nrc-db:
|
||||
condition: service_healthy
|
||||
@@ -156,7 +162,7 @@ services:
|
||||
networks: [cg]
|
||||
|
||||
nrc-web:
|
||||
image: docker.io/openzaak/open-notificaties:${OPENNOTIFICATIES_TAG:-1.16.1}
|
||||
image: register-referentie/opennotificaties:dev
|
||||
environment: *nrc-env
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "-c", "import requests,sys; sys.exit(0 if requests.head('http://localhost:8000/admin/').status_code in (200,302) else 1)"]
|
||||
@@ -172,7 +178,7 @@ services:
|
||||
networks: [cg]
|
||||
|
||||
nrc-celery:
|
||||
image: docker.io/openzaak/open-notificaties:${OPENNOTIFICATIES_TAG:-1.16.1}
|
||||
image: register-referentie/opennotificaties:dev
|
||||
environment: *nrc-env
|
||||
command: /celery_worker.sh
|
||||
depends_on:
|
||||
@@ -182,7 +188,10 @@ services:
|
||||
|
||||
# ── Keycloak (S-02) ──────────────────────────────────────────────────────
|
||||
keycloak:
|
||||
image: quay.io/keycloak/keycloak:26.1
|
||||
build:
|
||||
context: ./keycloak
|
||||
dockerfile: Dockerfile
|
||||
image: register-referentie/keycloak:dev
|
||||
command: ["start-dev", "--import-realm"]
|
||||
environment:
|
||||
KC_BOOTSTRAP_ADMIN_USERNAME: admin
|
||||
@@ -193,8 +202,6 @@ services:
|
||||
KC_HTTP_ENABLED: "true"
|
||||
ports:
|
||||
- "8180:8080"
|
||||
volumes:
|
||||
- ./keycloak/realms:/opt/keycloak/data/import:ro
|
||||
networks: [cg]
|
||||
|
||||
# ── Flowable (S-03) ──────────────────────────────────────────────────────
|
||||
@@ -228,10 +235,16 @@ services:
|
||||
networks: [cg]
|
||||
|
||||
flowable-init:
|
||||
image: docker.io/curlimages/curl:latest
|
||||
# The BPMN is baked into a tiny curl image (build context = repo-root
|
||||
# workflows/) instead of bind-mounted, so the deploy works on Gitea's
|
||||
# containerized runner too. See docs/runbooks/gitea-actions-gotchas.md.
|
||||
build:
|
||||
context: ../workflows
|
||||
dockerfile_inline: |
|
||||
FROM docker.io/curlimages/curl:latest
|
||||
COPY registratie.bpmn /work/registratie.bpmn
|
||||
image: register-referentie/flowable-init:dev
|
||||
restart: "no"
|
||||
volumes:
|
||||
- ../workflows/registratie.bpmn:/work/registratie.bpmn:ro
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
|
||||
Reference in New Issue
Block a user