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>
100 lines
3.1 KiB
YAML
100 lines
3.1 KiB
YAML
# OpenZaak stack (S-01). Lean adaptation of the upstream open-zaak dev compose:
|
|
# db (PostGIS) + redis + a one-shot init (migrations) + the API + a celery worker.
|
|
# Dropped from upstream for leanness: nginx, celery-beat, flower, OTEL.
|
|
#
|
|
# docker compose -f infra/openzaak/docker-compose.yml up -d --wait
|
|
# curl -i http://localhost:8000/zaken/api/v1/zaken # -> 401 (auth required)
|
|
#
|
|
# NOTE: image pinned to a tag (not :latest) once a known-good tag is chosen; see
|
|
# the catalogus-design ADR. Using a tag var with a sensible default for now.
|
|
services:
|
|
oz-db:
|
|
image: docker.io/postgis/postgis:17-3.5
|
|
environment:
|
|
POSTGRES_USER: openzaak
|
|
POSTGRES_PASSWORD: openzaak
|
|
POSTGRES_DB: openzaak
|
|
command: postgres -c max_connections=300
|
|
volumes:
|
|
- oz-db:/var/lib/postgresql/data
|
|
healthcheck:
|
|
# pg_isready only checks TCP; the second clause verifies PostGIS is installed
|
|
# so oz-init migrations can safely start (avoids race on cold container start).
|
|
test: ["CMD-SHELL", "pg_isready -U openzaak -d openzaak && psql -U openzaak -d openzaak -c 'SELECT PostGIS_Version();' -q 2>/dev/null"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 30
|
|
start_period: 15s
|
|
networks: [cg]
|
|
|
|
oz-redis:
|
|
image: docker.io/library/redis:7
|
|
networks: [cg]
|
|
|
|
oz-init:
|
|
build:
|
|
context: .
|
|
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}
|
|
DB_HOST: oz-db
|
|
DB_NAME: openzaak
|
|
DB_USER: openzaak
|
|
DB_PASSWORD: openzaak
|
|
IS_HTTPS: "no"
|
|
ALLOWED_HOSTS: "*"
|
|
CACHE_DEFAULT: oz-redis:6379/0
|
|
CACHE_AXES: oz-redis:6379/0
|
|
CELERY_BROKER_URL: redis://oz-redis:6379/1
|
|
CELERY_RESULT_BACKEND: redis://oz-redis:6379/1
|
|
DISABLE_2FA: "true"
|
|
# Notifications go to Open Notificaties (NRC), which arrives in S-01-c.
|
|
# Until then, disable outbound notifications so writes don't 500.
|
|
NOTIFICATIONS_DISABLED: "true"
|
|
OPENZAAK_SUPERUSER_USERNAME: admin
|
|
DJANGO_SUPERUSER_PASSWORD: admin
|
|
OPENZAAK_SUPERUSER_EMAIL: admin@localhost
|
|
RUN_SETUP_CONFIG: "true"
|
|
command: /setup_configuration.sh
|
|
depends_on:
|
|
oz-db:
|
|
condition: service_healthy
|
|
oz-redis:
|
|
condition: service_started
|
|
networks: [cg]
|
|
|
|
openzaak:
|
|
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)"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
start_period: 30s
|
|
ports:
|
|
- "8000:8000"
|
|
depends_on:
|
|
oz-init:
|
|
condition: service_completed_successfully
|
|
networks: [cg]
|
|
|
|
oz-celery:
|
|
image: register-referentie/openzaak:dev
|
|
environment: *oz-env
|
|
command: /celery_worker.sh
|
|
depends_on:
|
|
oz-init:
|
|
condition: service_completed_successfully
|
|
networks: [cg]
|
|
|
|
volumes:
|
|
oz-db:
|
|
|
|
networks:
|
|
cg:
|