## What & why The ACL was handed a **pinned zaaktype URL** (`Acl__Defaults__ZaaktypeUrl`) + informatieobjecttype URL. OpenZaak assigns those UUIDs at creation, so every stack had to seed the catalogus and then capture + inject the resulting URLs out of band (CI's `run-domain-check.sh`; the local `local-seed`→`acl.env` bootstrap from ADR-0020). Brittle, and a stale/placeholder URL failed opaquely (OpenZaak 400). Now **the ACL resolves them itself** from OpenZaak's Catalogi API by stable business key: - config `ZaaktypeIdentificatie` (`BIG-REGISTRATIE`) / `InformatieobjecttypeOmschrijving` (`Diploma`); - a `CachedZaaktypeCatalog` resolves **lazily on first use** and caches (success only, so a pre-publish miss is retried — no startup ordering coupling); - a clear "No published … found" error replaces the opaque placeholder 400. Design in **ADR-0021** (proposed in #117). Closes #113 Closes #117 ## Consequences (the payoff) No stack captures/injects a server-assigned URL any more — `docker-compose.yml`/`.local.yml`, `run-domain-check.sh` and `local-seed` all drop it; the local `acl.env` shrinks to a single line. **One thing S-27 can't remove** (confirmed empirically during this work): OpenZaak validates the `zaaktype` field on zaak-create with Django's URLValidator and **rejects a single-label host** (`http://openzaak:8000/…` → `zaaktype: bad-url`). So the ACL's **base URL** must still point at a URL-valid host (a container IP); that base-URL injection from ADR-0020 stays (local `acl.env` now carries only it; CI keeps `ACL_OPENZAAK_BASEURL`). ADR-0021 records this. ## Definition of Done - [x] Linked issues (#113 slice, #117 adr-proposal). - [x] TDD — resolver + gateway-lookup unit tests, updated `AclService` tests (50 unit tests green). - [x] Implementation makes them pass; refactor of both compose stacks + verify scripts follows. - [x] Conventional Commits referencing #113. - [ ] CI green — see below. - [x] `docker compose up` reaches green health — verified: fresh `make local` + `make verify-local` green with **no zaaktype-URL injection**; `acl.env` is base-URL-only. - [x] Docs — ADR-0021 + demo-script S-27 note. - [x] ADR added (ADR-0021). - [x] Demo note appended. ## Verification done locally - **50 unit tests** pass (resolver resolve/cache/retry-on-failure; gateway match/miss/blank-key; all `AclService` paths). - **6 ACL integration tests** pass against a live seeded OpenZaak — incl. resolving the zaaktype + Diploma iot by business key, and a clear error for an unknown identificatie. - **Fresh `make local` + `make verify-local`**: full flow (submit → werkbak → openbaar) green; `acl.env` = `Acl__OpenZaak__BaseUrl` only. - `make lint` clean; ACL mutation ratchet run locally (see checks). ## Notes for reviewers - `IZaakGateway` gains two resolve methods; `AclService` depends on the new `IZaaktypeCatalog` (singleton, so the cache persists). - Supersedes the pinned-URL mechanism; ADR-0021 documents that ADR-0020's `seed-env`/entrypoint shim are **simplified** (base-URL only), not deleted, because of the URLValidator constraint above. Reviewed-on: #118
573 lines
22 KiB
YAML
573 lines
22 KiB
YAML
# LOCAL development stack — runs with a plain `docker compose up`, no make / no
|
|
# external seed step / no bash. Use this on a local engine (Docker Desktop on Windows or
|
|
# macOS, or rootless Podman on Linux).
|
|
#
|
|
# Self-seeding (S-B04, #110, ADR-0020): unlike the CI stack — where the verify-* scripts seed the
|
|
# zaaktype and register the NRC abonnement at test time — this stack does that itself, via one-shot
|
|
# init containers (local-seed, nrc-subscribe) + a DMN deploy in flowable-init, so a fresh bring-up
|
|
# completes the whole flow with no manual steps. `make verify-local` asserts it.
|
|
#
|
|
# docker compose -f infra/docker-compose.local.yml up -d --build # podman
|
|
# docker compose -f infra/docker-compose.local.yml up -d --build --wait # Docker Desktop
|
|
# docker compose -f infra/docker-compose.local.yml down --volumes
|
|
#
|
|
# It is identical to infra/docker-compose.yml EXCEPT that the three config inputs
|
|
# (OpenZaak data.yaml, Keycloak realms, Flowable BPMN) are **bind-mounted** from
|
|
# the repo instead of being streamed into external volumes by infra/seed-config.sh.
|
|
# Bind mounts work here because a local daemon can see your working directory —
|
|
# the seed dance only exists for the containerized CI runner, where it can't. See
|
|
# docs/runbooks/gitea-actions-gotchas.md.
|
|
#
|
|
# `infra/docker-compose.yml` remains the CI-canonical stack; keep the two in sync.
|
|
#
|
|
# Port map (host):
|
|
# 8000 OpenZaak · 8001 Open Notificaties · 8080 BFF · 8090 Flowable REST
|
|
# 8100 ACL · 8130 Domain · 8180 Keycloak (all admin: admin / admin — dev only)
|
|
# 8140 self-service portal · 8141 openbaar register · 8142 behandel portal
|
|
#
|
|
# Portal OIDC on the HOST: browse the portals at their 8140/8141/8142 ports and log in via
|
|
# Keycloak on localhost:8180 (KC_HOSTNAME below pins the issuer there; the BFF still validates
|
|
# in-network via keycloak:8080). Test users are in docs/synthetic-data.md.
|
|
|
|
services:
|
|
|
|
# ── OpenZaak (S-01) ──────────────────────────────────────────────────────
|
|
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:
|
|
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:
|
|
image: docker.io/openzaak/open-zaak:${OPENZAAK_TAG:-1.28.2}
|
|
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"
|
|
# Publish notifications to NRC (always present in this twin). See ADR-0007.
|
|
NOTIFICATIONS_DISABLED: "false"
|
|
OPENZAAK_SUPERUSER_USERNAME: admin
|
|
DJANGO_SUPERUSER_PASSWORD: admin
|
|
OPENZAAK_SUPERUSER_EMAIL: admin@localhost
|
|
RUN_SETUP_CONFIG: "true"
|
|
command: /setup_configuration.sh
|
|
# Bind mount (`:z` relabels for SELinux on Linux; a no-op on Docker Desktop).
|
|
volumes:
|
|
- ./openzaak/setup_configuration:/app/setup_configuration:ro,z
|
|
depends_on:
|
|
oz-db:
|
|
condition: service_healthy
|
|
oz-redis:
|
|
condition: service_started
|
|
networks: [cg]
|
|
|
|
openzaak:
|
|
image: docker.io/openzaak/open-zaak:${OPENZAAK_TAG:-1.28.2}
|
|
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: docker.io/openzaak/open-zaak:${OPENZAAK_TAG:-1.28.2}
|
|
environment: *oz-env
|
|
command: /celery_worker.sh
|
|
depends_on:
|
|
oz-init:
|
|
condition: service_completed_successfully
|
|
networks: [cg]
|
|
|
|
# ── Open Notificaties / NRC (S-01-c) ─────────────────────────────────────
|
|
nrc-db:
|
|
image: docker.io/postgis/postgis:17-3.5
|
|
environment:
|
|
POSTGRES_USER: opennotificaties
|
|
POSTGRES_PASSWORD: opennotificaties
|
|
POSTGRES_DB: opennotificaties
|
|
command: postgres -c max_connections=300
|
|
volumes:
|
|
- nrc-db:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U opennotificaties -d opennotificaties"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 10
|
|
networks: [cg]
|
|
|
|
nrc-redis:
|
|
image: docker.io/library/redis:7
|
|
networks: [cg]
|
|
|
|
nrc-init:
|
|
# Migrations + setup_configuration (S-01-c): the JWT credential, Autorisaties-API
|
|
# delegation, and the `zaken` kanaal that let OpenZaak publish. Config is
|
|
# bind-mounted here (this twin is the local/no-make path). See ADR-0007.
|
|
image: docker.io/openzaak/open-notificaties:${OPENNOTIFICATIES_TAG:-1.16.1}
|
|
environment: &nrc-env
|
|
DJANGO_SETTINGS_MODULE: nrc.conf.docker
|
|
SECRET_KEY: ${NRC_SECRET_KEY:-dev-only-not-for-production}
|
|
DB_HOST: nrc-db
|
|
DB_NAME: opennotificaties
|
|
DB_USER: opennotificaties
|
|
DB_PASSWORD: opennotificaties
|
|
IS_HTTPS: "no"
|
|
ALLOWED_HOSTS: "*"
|
|
CACHE_DEFAULT: nrc-redis:6379/0
|
|
CACHE_AXES: nrc-redis:6379/0
|
|
CELERY_BROKER_URL: redis://nrc-redis:6379/1
|
|
CELERY_RESULT_BACKEND: redis://nrc-redis:6379/1
|
|
DISABLE_2FA: "true"
|
|
OPENNOTIFICATIES_SUPERUSER_USERNAME: admin
|
|
DJANGO_SUPERUSER_PASSWORD: admin
|
|
OPENNOTIFICATIES_SUPERUSER_EMAIL: admin@localhost
|
|
RUN_SETUP_CONFIG: "true"
|
|
NOTIFICATION_SEC_INTERVAL: "5"
|
|
command: /setup_configuration.sh
|
|
volumes:
|
|
- ./opennotificaties/setup_configuration:/app/setup_configuration:ro,z
|
|
depends_on:
|
|
nrc-db:
|
|
condition: service_healthy
|
|
nrc-redis:
|
|
condition: service_started
|
|
openzaak:
|
|
condition: service_healthy
|
|
networks: [cg]
|
|
|
|
nrc-web:
|
|
image: docker.io/openzaak/open-notificaties:${OPENNOTIFICATIES_TAG:-1.16.1}
|
|
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)"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
start_period: 30s
|
|
ports:
|
|
- "8001:8000"
|
|
depends_on:
|
|
nrc-init:
|
|
condition: service_completed_successfully
|
|
networks: [cg]
|
|
|
|
nrc-celery:
|
|
image: docker.io/openzaak/open-notificaties:${OPENNOTIFICATIES_TAG:-1.16.1}
|
|
environment: *nrc-env
|
|
command: /celery_worker.sh
|
|
depends_on:
|
|
nrc-init:
|
|
condition: service_completed_successfully
|
|
networks: [cg]
|
|
|
|
# Celery beat drains scheduled notifications to subscribers — required for
|
|
# delivery, not optional. See ADR-0007.
|
|
nrc-beat:
|
|
image: docker.io/openzaak/open-notificaties:${OPENNOTIFICATIES_TAG:-1.16.1}
|
|
environment: *nrc-env
|
|
command: /celery_beat.sh
|
|
depends_on:
|
|
nrc-init:
|
|
condition: service_completed_successfully
|
|
networks: [cg]
|
|
|
|
# ── Keycloak (S-02) ──────────────────────────────────────────────────────
|
|
keycloak:
|
|
image: quay.io/keycloak/keycloak:26.1
|
|
command: ["start-dev", "--import-realm"]
|
|
environment:
|
|
KC_BOOTSTRAP_ADMIN_USERNAME: admin
|
|
KC_BOOTSTRAP_ADMIN_PASSWORD: admin
|
|
KEYCLOAK_ADMIN: admin
|
|
KEYCLOAK_ADMIN_PASSWORD: admin
|
|
KC_HEALTH_ENABLED: "true"
|
|
KC_HTTP_ENABLED: "true"
|
|
# Pin the frontend/issuer URL to the host-published address so a browser on the host and the
|
|
# tokens it gets both use localhost:8180. KC_HOSTNAME_BACKCHANNEL_DYNAMIC lets in-network
|
|
# callers (the BFF via keycloak:8080) still resolve token/jwks endpoints to their request host,
|
|
# so the BFF validates the localhost:8180 issuer while fetching keys over the compose network.
|
|
KC_HOSTNAME: http://localhost:8180
|
|
KC_HOSTNAME_BACKCHANNEL_DYNAMIC: "true"
|
|
ports:
|
|
- "8180:8080"
|
|
volumes:
|
|
- ./keycloak/realms:/opt/keycloak/data/import:ro,z
|
|
networks: [cg]
|
|
|
|
# ── Flowable (S-03) ──────────────────────────────────────────────────────
|
|
flowable-db:
|
|
image: docker.io/library/postgres:16
|
|
environment:
|
|
POSTGRES_USER: flowable
|
|
POSTGRES_PASSWORD: flowable
|
|
POSTGRES_DB: flowable
|
|
volumes:
|
|
- flowable-db:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U flowable -d flowable"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 10
|
|
networks: [cg]
|
|
|
|
flowable-rest:
|
|
image: docker.io/flowable/flowable-rest:latest
|
|
environment:
|
|
SPRING_DATASOURCE_DRIVER-CLASS-NAME: org.postgresql.Driver
|
|
SPRING_DATASOURCE_URL: jdbc:postgresql://flowable-db:5432/flowable
|
|
SPRING_DATASOURCE_USERNAME: flowable
|
|
SPRING_DATASOURCE_PASSWORD: flowable
|
|
ports:
|
|
- "8090:8080"
|
|
depends_on:
|
|
flowable-db:
|
|
condition: service_healthy
|
|
networks: [cg]
|
|
|
|
flowable-init:
|
|
image: docker.io/curlimages/curl:latest
|
|
restart: "no"
|
|
volumes:
|
|
- ../workflows/registratie.bpmn:/work/registratie.bpmn:ro,z
|
|
- ../workflows/diploma-eligibility.dmn:/work/diploma-eligibility.dmn:ro,z
|
|
command:
|
|
- sh
|
|
- -c
|
|
- |
|
|
svc=http://flowable-rest:8080/flowable-rest/service/repository/deployments
|
|
dmn=http://flowable-rest:8080/flowable-rest/dmn-api/dmn-repository/deployments
|
|
until curl -sf -u rest-admin:test "$$svc" >/dev/null 2>&1; do echo "waiting for flowable-rest..."; sleep 3; done
|
|
# Deploy the DMN to the DMN engine and the BPMN to the process engine as SEPARATE deployments:
|
|
# flowable-rest does NOT cascade a .dmn bundled in a process .bar into the DMN engine, so the DMN
|
|
# must go via dmn-api. The registratie process's DMN service task then resolves the decision across
|
|
# deployments by key (S-13, ADR-0016). Without this the WachtOpDocumenten completion 404s on the
|
|
# missing decision and the case never reaches Beoordelen (S-B04). Both steps are idempotent.
|
|
if curl -s -u rest-admin:test "$$dmn" | grep -q '"name":"diploma-eligibility.dmn"'; then
|
|
echo "diploma-eligibility DMN already deployed; skip"
|
|
else
|
|
curl -sf -u rest-admin:test -F 'file=@/work/diploma-eligibility.dmn;filename=diploma-eligibility.dmn' "$$dmn" >/dev/null && echo "deployed diploma-eligibility DMN"
|
|
fi
|
|
if curl -s -u rest-admin:test "$$svc?name=registratie" | grep -q '"name":"registratie"'; then
|
|
echo "registratie BPMN already deployed; skip"
|
|
else
|
|
curl -sf -u rest-admin:test -F 'file=@/work/registratie.bpmn;filename=registratie.bpmn' "$$svc" >/dev/null && echo "deployed registratie BPMN"
|
|
fi
|
|
depends_on:
|
|
flowable-rest:
|
|
condition: service_started
|
|
networks: [cg]
|
|
|
|
# ── Local bootstrap: seed the zaaktype + wire the ACL (S-B04, #110, ADR-0020) ─────────────────
|
|
# The zaaktype UUID is assigned by OpenZaak at creation, so it can't be a static value in this
|
|
# file. This one-shot seeds + publishes the BIG zaaktype (and the Diploma informatieobjecttype)
|
|
# and writes their server-assigned URLs into a shared volume as acl.env, which the ACL sources on
|
|
# startup (below). It is the local-stack equivalent of what infra/run-domain-check.sh does for CI.
|
|
# Reaches OpenZaak by its container IP because a single-label host fails OpenZaak's URLValidator.
|
|
local-seed:
|
|
image: docker.io/library/python:3-slim
|
|
restart: "no"
|
|
volumes:
|
|
- ./openzaak/seed_catalogus.py:/work/seed_catalogus.py:ro,z
|
|
- ./local/seed-zaaktype.sh:/work/seed-zaaktype.sh:ro,z
|
|
- seed-env:/out
|
|
command: ["sh", "/work/seed-zaaktype.sh"]
|
|
depends_on:
|
|
openzaak:
|
|
condition: service_healthy
|
|
networks: [cg]
|
|
|
|
# ── ACL ──────────────────────────────────────────────────────────────────
|
|
acl:
|
|
build:
|
|
context: ../services/acl
|
|
dockerfile: Dockerfile
|
|
image: register-referentie/acl:dev
|
|
# The ACL discovers its zaaktype + informatieobjecttype URLs from the Catalogi API by the business
|
|
# keys below (S-27, ADR-0021), so no URL is injected. It still needs its OpenZaak BaseUrl pointed at
|
|
# a URL-valid host (OpenZaak rejects a single-label host like `openzaak` on zaak-create), so the
|
|
# local-seed one-shot writes that IP base into seed-env:/seed/acl.env, which the entrypoint sources
|
|
# (set -a) before the app starts. A runtime-generated env file is why we override the entrypoint here
|
|
# rather than use `env_file:` (which compose reads at parse time, before the seed has run).
|
|
entrypoint: ["/bin/sh", "-c", "set -a; . /seed/acl.env; set +a; exec dotnet Acl.Api.dll"]
|
|
environment:
|
|
Acl__OpenZaak__BaseUrl: http://openzaak:8000/ # placeholder; seed-env/acl.env supplies the IP base
|
|
Acl__OpenZaak__ClientId: big-reference-seed
|
|
Acl__OpenZaak__Secret: insecure-dev-secret-change-me
|
|
Acl__Defaults__Bronorganisatie: "517439943"
|
|
Acl__Defaults__VerantwoordelijkeOrganisatie: "517439943"
|
|
Acl__Defaults__Vertrouwelijkheidaanduiding: openbaar
|
|
Acl__Defaults__ZaaktypeIdentificatie: BIG-REGISTRATIE
|
|
Acl__Defaults__InformatieobjecttypeOmschrijving: Diploma
|
|
ports:
|
|
- "8100:8080"
|
|
volumes:
|
|
- seed-env:/seed:ro
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-fsS", "http://localhost:8080/health"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
start_period: 10s
|
|
depends_on:
|
|
openzaak:
|
|
condition: service_healthy
|
|
local-seed:
|
|
condition: service_completed_successfully
|
|
networks: [cg]
|
|
|
|
# ── BFF ──────────────────────────────────────────────────────────────────
|
|
bff:
|
|
build:
|
|
context: ../services/bff
|
|
dockerfile: Dockerfile
|
|
image: register-referentie/bff:dev
|
|
environment:
|
|
# Reach Keycloak over the compose network for metadata/keys; the discovered issuer is the
|
|
# host-pinned localhost:8180 (KC_HOSTNAME above), which is what browser tokens carry — so
|
|
# validation matches without the BFF ever needing to resolve localhost:8180 itself.
|
|
Keycloak__Authority: http://keycloak:8080/realms/digid
|
|
Keycloak__MedewerkerAuthority: http://keycloak:8080/realms/medewerker
|
|
Downstream__Domain__BaseUrl: http://domain:8080/
|
|
Downstream__Projection__BaseUrl: http://projection-api:8080/
|
|
ports:
|
|
- "8080:8080"
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-fsS", "http://localhost:8080/health"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
start_period: 10s
|
|
depends_on:
|
|
domain:
|
|
condition: service_healthy
|
|
projection-api:
|
|
condition: service_healthy
|
|
keycloak:
|
|
condition: service_started
|
|
networks: [cg]
|
|
|
|
# ── BIG Domain Service (S-05) ─────────────────────────────────────────────
|
|
domain:
|
|
build:
|
|
context: ../services/domain
|
|
dockerfile: Dockerfile
|
|
image: register-referentie/domain:dev
|
|
environment:
|
|
Flowable__BaseUrl: http://flowable-rest:8080/flowable-rest/
|
|
Flowable__Username: rest-admin
|
|
Flowable__Password: test
|
|
Acl__BaseUrl: http://acl:8080/
|
|
ports:
|
|
- "8130:8080"
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-fsS", "http://localhost:8080/health"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
start_period: 10s
|
|
depends_on:
|
|
acl:
|
|
condition: service_healthy
|
|
flowable-init:
|
|
condition: service_completed_successfully
|
|
networks: [cg]
|
|
|
|
# ── Read projection (S-06) ────────────────────────────────────────────────
|
|
projection-db:
|
|
image: docker.io/library/postgres:16
|
|
environment:
|
|
POSTGRES_USER: projection
|
|
POSTGRES_PASSWORD: projection
|
|
POSTGRES_DB: projection
|
|
volumes:
|
|
- projection-db:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U projection -d projection"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 10
|
|
networks: [cg]
|
|
|
|
event-subscriber:
|
|
build:
|
|
context: ..
|
|
dockerfile: services/event-subscriber/Dockerfile
|
|
image: register-referentie/event-subscriber:dev
|
|
environment:
|
|
ConnectionStrings__Projection: Host=projection-db;Database=projection;Username=projection;Password=projection
|
|
# The subscriber enriches the projection with each zaak's reference by asking the ACL — the only
|
|
# code allowed to read ZGW (§8.1, #78). Required: startup throws without it (parity with the
|
|
# canonical compose).
|
|
Acl__BaseUrl: http://acl:8080/
|
|
EventSubscriber__Webhook__AuthToken: ${NOTIFICATION_WEBHOOK_TOKEN:-Bearer big-reference-notifications}
|
|
ports:
|
|
- "8110:8080"
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-fsS", "http://localhost:8080/health"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
start_period: 15s
|
|
depends_on:
|
|
projection-db:
|
|
condition: service_healthy
|
|
acl:
|
|
condition: service_healthy
|
|
networks: [cg]
|
|
|
|
# ── Local bootstrap: register the NRC abonnement (S-B04, #110, ADR-0020) ──────────────────────
|
|
# Without a subscription, OpenZaak's notifications reach NRC and are delivered nowhere, so the
|
|
# projection (and the openbaar register) stay empty. This one-shot registers an abonnement on the
|
|
# `zaken` kanaal pointing at the event-subscriber's /notifications callback — the CI equivalent is
|
|
# infra/verify-notification-driver.py. The callback uses the event-subscriber's container IP (a
|
|
# single-label host fails NRC's URLValidator). It is a leaf (nothing depends on it), so it can wait
|
|
# for the event-subscriber without creating a cycle with the ACL bootstrap.
|
|
nrc-subscribe:
|
|
image: docker.io/library/python:3-slim
|
|
restart: "no"
|
|
volumes:
|
|
- ./local/register-abonnement.py:/work/register-abonnement.py:ro,z
|
|
environment:
|
|
NRC_BASE: http://nrc-web:8000
|
|
SINK_HOST: event-subscriber
|
|
SINK_PORT: "8080"
|
|
SINK_AUTH: ${NOTIFICATION_WEBHOOK_TOKEN:-Bearer big-reference-notifications}
|
|
command: ["python", "/work/register-abonnement.py"]
|
|
depends_on:
|
|
nrc-web:
|
|
condition: service_healthy
|
|
event-subscriber:
|
|
condition: service_started
|
|
networks: [cg]
|
|
|
|
projection-api:
|
|
build:
|
|
context: ..
|
|
dockerfile: services/projection-api/Dockerfile
|
|
image: register-referentie/projection-api:dev
|
|
environment:
|
|
ConnectionStrings__Projection: Host=projection-db;Database=projection;Username=projection;Password=projection
|
|
ports:
|
|
- "8120:8080"
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-fsS", "http://localhost:8080/health"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
start_period: 15s
|
|
depends_on:
|
|
projection-db:
|
|
condition: service_healthy
|
|
networks: [cg]
|
|
|
|
# ── Portals (S-08/S-09/S-12) ──────────────────────────────────────────────
|
|
# nginx serves each Angular app and reverse-proxies its endpoint group to the BFF (same-origin).
|
|
# The images bake config.json with the compose authority (keycloak:8080), which a HOST browser
|
|
# can't resolve — so here we bind-mount a config.json pointing at the host-published localhost:8180
|
|
# (matching KC_HOSTNAME). openbaar is anonymous and needs no config.
|
|
self-service:
|
|
build:
|
|
context: ..
|
|
dockerfile: apps/self-service/Dockerfile
|
|
image: register-referentie/self-service:dev
|
|
ports:
|
|
- "8140:80"
|
|
volumes:
|
|
- ./local-config/self-service.config.json:/usr/share/nginx/html/config.json:ro,z
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -q -O /dev/null http://127.0.0.1/ || exit 1"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
start_period: 10s
|
|
depends_on:
|
|
bff:
|
|
condition: service_healthy
|
|
keycloak:
|
|
condition: service_started
|
|
networks: [cg]
|
|
|
|
openbaar:
|
|
build:
|
|
context: ..
|
|
dockerfile: apps/openbaar/Dockerfile
|
|
image: register-referentie/openbaar:dev
|
|
ports:
|
|
- "8141:80"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -q -O /dev/null http://127.0.0.1/ || exit 1"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
start_period: 10s
|
|
depends_on:
|
|
bff:
|
|
condition: service_healthy
|
|
networks: [cg]
|
|
|
|
behandel:
|
|
build:
|
|
context: ..
|
|
dockerfile: apps/behandel/Dockerfile
|
|
image: register-referentie/behandel:dev
|
|
ports:
|
|
- "8142:80"
|
|
volumes:
|
|
- ./local-config/behandel.config.json:/usr/share/nginx/html/config.json:ro,z
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -q -O /dev/null http://127.0.0.1/ || exit 1"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
start_period: 10s
|
|
depends_on:
|
|
bff:
|
|
condition: service_healthy
|
|
keycloak:
|
|
condition: service_started
|
|
networks: [cg]
|
|
|
|
volumes:
|
|
oz-db:
|
|
nrc-db:
|
|
flowable-db:
|
|
projection-db:
|
|
# Carries the seed-generated acl.env (server-assigned zaaktype URLs) from local-seed to the ACL.
|
|
seed-env:
|
|
|
|
networks:
|
|
cg:
|