Files
register-referentie/infra/openzaak/docker-compose.yml
Edwin van den Houdt ee3be92e38
Some checks failed
CI / lint (pull_request) Has been cancelled
CI / build (pull_request) Has been cancelled
CI / unit (pull_request) Has been cancelled
CI / compose-smoke (pull_request) Has been cancelled
feat(infra): Open Notificaties up + shared network with OpenZaak (closes #2)
Add infra/opennotificaties/docker-compose.yml (PostGIS db, redis broker,
migrate-init, API, celery worker) on a shared `cg` network with the
OpenZaak stack (renamed oz->cg), published on host :8001. Add combined
`make stack-up/stack-smoke/stack-down` targets and a runbook.

Completes S-01's acceptance: OpenZaak + Open Notificaties + Postgres come
up in compose and a health check confirms all reachable (OZ 403/302/200,
NRC 302; cross-network DNS verified). Catalogus seed landed in S-01-b.

OZ->NRC notification *delivery* wiring (NRC setup_configuration: Services +
Authorization + JWT + Kanalen + Abonnementen; OZ NotificationConfig; re-
enabling NOTIFICATIONS_DISABLED) is deferred to S-06 (Event Subscriber),
the slice that consumes events. NRC data.yaml is migrate-only until then.

Verified: `make stack-smoke` green (both platforms reachable).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 15:58:51 +02:00

96 lines
3.0 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:
test: ["CMD-SHELL", "pg_isready -U openzaak -d openzaak"]
interval: 5s
timeout: 3s
retries: 10
networks: [cg]
oz-redis:
image: docker.io/library/redis:7
networks: [cg]
oz-init:
image: docker.io/openzaak/open-zaak:${OPENZAAK_TAG:-latest}
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
volumes:
# :z relabels for SELinux; the dir/file must be world-readable for the
# container user (rootless Podman uid mapping). See docs/runbooks/openzaak.md.
- ./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:-latest}
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:-latest}
environment: *oz-env
command: /celery_worker.sh
depends_on:
oz-init:
condition: service_completed_successfully
networks: [cg]
volumes:
oz-db:
networks:
cg: