diff --git a/infra/run-projection-check.sh b/infra/run-projection-check.sh index 2ea12ac..53e3ac4 100755 --- a/infra/run-projection-check.sh +++ b/infra/run-projection-check.sh @@ -12,11 +12,15 @@ # which is the point of the re-source. # # All in-network, reaching services by container IP — single-label hosts aren't URL-valid and -# the runner can't reach published ports (gitea-actions-gotchas.md §5/§6). Does NOT manage the stack -# lifecycle (the caller owns bring-up + teardown). Plain docker primitives only. See ADR-0007/0008/0030. +# the runner can't reach published ports (gitea-actions-gotchas.md §5/§6). Does not own the stack +# lifecycle (the caller brings it up and tears it down), but does recreate the `acl` service to +# repoint it — see below, and run-domain-check.sh, which does the same. Plain docker primitives only. +# See ADR-0007/0008/0030. set -euo pipefail here="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +root="$(cd "$here/.." && pwd)" +compose="$root/infra/docker-compose.yml" WEBHOOK_AUTH="${NOTIFICATION_WEBHOOK_TOKEN:-Bearer big-reference-notifications}" cleanup() { docker rm -f rr-pverify rr-pquery >/dev/null 2>&1 || true; } @@ -54,6 +58,19 @@ docker cp "$here/local/register-abonnement.py" "$drv:/subscribe.py" >/dev/null docker start -a "$drv" docker rm -f rr-pverify >/dev/null +# OpenZaak reflects the request Host into the zaaktype `url` it returns, and then rejects that same +# URL on zaak-create when the host is single-label ("Voer een geldige URL in."). The stack's ACL is +# configured with `http://openzaak:8000/`, so it must be repointed at OpenZaak's container IP before +# it can open a zaak — exactly what run-domain-check.sh does, and the same class of constraint as the +# `objecten.local` alias (ADR-0029). The ACL resolves the zaaktype itself (S-27, ADR-0021), so the +# base URL is the only thing to inject. +echo ">> recreating the acl service pointed at OpenZaak's IP" +ACL_OPENZAAK_BASEURL="http://$oz_ip:8000/" docker compose -f "$compose" up -d acl +WAIT_TIMEOUT="${WAIT_TIMEOUT:-120}" bash "$here/wait-healthy.sh" acl +# The container is replaced, so its IP may have changed. +acl="$(docker ps -q --filter 'name=[-_]acl[-_]' | head -1)" +acl_ip="$(ip "$acl")" + echo ">> opening a zaak through the ACL (which writes the INGEDIEND register record)" reference="PROJ-$(date +%s)" zaak_url="$(docker run --rm --network "$net" curlimages/curl:latest \