Files
register-referentie/infra/flowable/docker-compose.yml
Niek Otten 2411e72aee
Some checks failed
CI / lint (pull_request) Successful in 1m13s
CI / build (pull_request) Successful in 58s
CI / unit (pull_request) Successful in 1m9s
CI / frontend (pull_request) Successful in 2m37s
CI / mutation (pull_request) Successful in 5m5s
CI / verify-stack (pull_request) Failing after 3m55s
fix(infra): deploy the DMN via the process repository, not dmn-api (S-13, refs #14)
flowable/flowable-rest embeds the DMN engine but does not expose the dmn-api REST
app, so POSTing the .dmn to dmn-api/dmn-repository/deployments 404'd and
flowable-init exited 22. Deploy the .dmn through the process repository endpoint
instead; the process deployment cross-deploys the resource to the DMN engine,
where the registratie businessRuleTask resolves it by key.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-18 10:57:41 +02:00

80 lines
3.1 KiB
YAML

# Flowable (S-03): the flowable-rest engine on Postgres.
# The registratie.bpmn model is deployed via the REST API on startup by flowable-init.
#
# docker compose -f infra/flowable/docker-compose.yml up -d
# # REST API (basic auth) under http://localhost:8090/flowable-rest/service/
#
# Host port 8090 (8000/8001/8080/8180 are taken by OpenZaak/NRC/BFF/Keycloak).
services:
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]
# Deploys workflows/registratie.bpmn + diploma-eligibility.dmn via the REST API once flowable-rest is up.
# Idempotent: skips each if a deployment of that name already exists.
flowable-init:
image: docker.io/curlimages/curl:latest
restart: "no"
# registratie.bpmn + diploma-eligibility.dmn are streamed into this external volume by infra/seed-config.sh.
volumes:
- fl-bpmn:/work:ro
command:
- sh
- -c
- |
base=http://flowable-rest:8080/flowable-rest/service/repository/deployments
until curl -sf -u rest-admin:test "$$base" >/dev/null 2>&1; do echo "waiting for flowable-rest..."; sleep 3; done
# Deploy the diploma-eligibility DMN via the process repository: the flowable-rest image embeds
# the DMN engine but does not expose the dmn-api app, so the process deployment cross-deploys the
# .dmn resource to the DMN engine, where the registratie businessRuleTask resolves it by key
# (S-13, ADR-0016).
if curl -s -u rest-admin:test "$$base?name=diploma-eligibility" | grep -q '"name":"diploma-eligibility"'; then
echo "diploma-eligibility already deployed; skip"
else
curl -sf -u rest-admin:test -F 'file=@/work/diploma-eligibility.dmn;filename=diploma-eligibility.dmn' "$$base" >/dev/null && echo "deployed diploma-eligibility"
fi
if curl -s -u rest-admin:test "$$base?name=registratie" | grep -q '"name":"registratie"'; then
echo "registratie already deployed; skip"
else
curl -sf -u rest-admin:test -F 'file=@/work/registratie.bpmn;filename=registratie.bpmn' "$$base" >/dev/null && echo "deployed registratie"
fi
depends_on:
flowable-rest:
condition: service_started
networks: [cg]
volumes:
flowable-db:
# populated out-of-band by infra/seed-config.sh (docker cp) — see that script.
fl-bpmn:
external: true
name: rr-fl-bpmn
networks:
cg: