-
Notifications
You must be signed in to change notification settings - Fork 0
Open notificaties docker compose #1090
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
viktorvanwijk
merged 4 commits into
main
from
chore/1088-open-notificaties-docker-compose
Sep 14, 2026
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
b4af0ac
:whale: [#1088] Add Open Notificaties docker compose
viktorvanwijk 3653da5
:whale: [#1088] Setup connection between components
viktorvanwijk b369e44
:wrench: [#1088] Update linux docker check
viktorvanwijk c6e99c6
:whale: [#1088] Enable sending cloudevents between Open Product, Open…
viktorvanwijk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
178 changes: 178 additions & 0 deletions
178
backend/docker-services/opennotificaties/docker-compose.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,178 @@ | ||
| # | ||
| # DISCLAIMER: THIS IS FOR DEVELOPMENT PURPOSES ONLY AND NOT SUITABLE FOR PRODUCTION. | ||
| # | ||
| # You can use this docker-compose to spin up a local stack for demo/try-out | ||
| # purposes, or to get some insight in the various components involved (e.g. to build | ||
| # your Helm charts from). Note that various environment variables are UNSAFE and merely | ||
| # specified so that you can get up and running with the least amount of friction. | ||
|
|
||
| services: | ||
| notificaties-db: | ||
| image: postgis/postgis:17-3.5 | ||
| environment: | ||
| - POSTGRES_HOST_AUTH_METHOD=trust | ||
| volumes: | ||
| - ./postgres.entrypoint-initdb.d:/docker-entrypoint-initdb.d:ro | ||
| - notificaties-db:/var/lib/postgresql/data | ||
| command: postgres -c max_connections=300 -c log_min_messages=LOG | ||
| healthcheck: | ||
| test: ["CMD-SHELL", "pg_isready -U opennotificaties -d opennotificaties"] | ||
| interval: 10s | ||
| timeout: 5s | ||
| retries: 5 | ||
| ports: | ||
| - "11234:5432" | ||
| networks: | ||
| - open-notificaties-dev | ||
|
|
||
| notificaties-redis: | ||
| image: redis:8 | ||
| healthcheck: | ||
| test: ["CMD", "redis-cli", "ping"] | ||
| interval: 30s | ||
| timeout: 1s | ||
| retries: 3 | ||
| networks: | ||
| - open-notificaties-dev | ||
|
|
||
| notificaties-web: | ||
| image: openzaak/open-notificaties:${OPENNOTIFICATIES_VERSION:-1.16.2} | ||
| environment: &app-env | ||
| DJANGO_SETTINGS_MODULE: nrc.conf.docker | ||
| SECRET_KEY: ${SECRET_KEY:-\(,gc7VE(#CO<zCR3e(lRtOsw5q+U2DpG5o\X#P4PVRm*=u|E%} | ||
| IS_HTTPS: no | ||
| ALLOWED_HOSTS: '*' | ||
| CACHE_DEFAULT: notificaties-redis:6379/0 | ||
| CACHE_AXES: notificaties-redis:6379/0 | ||
| DB_NAME: opennotificaties | ||
| DB_USER: opennotificaties | ||
| DB_HOST: notificaties-db | ||
| OPENNOTIFICATIES_SUPERUSER_USERNAME: admin | ||
| OPENNOTIFICATIES_SUPERUSER_EMAIL: admin@localhost | ||
| DJANGO_SUPERUSER_PASSWORD: admin | ||
| # Celery | ||
| CELERY_BROKER_URL: redis://notificaties-redis:6379/0 | ||
| CELERY_WORKER_NAME: celery@docker | ||
| CELERY_RESULT_EXPIRES: 3600 | ||
| CELERY_RESULT_BACKEND: redis://notificaties-redis:6379/0 | ||
| CELERY_LOGLEVEL: DEBUG | ||
| CELERY_WORKER_CONCURRENCY: ${CELERY_WORKER_CONCURRENCY:-100} | ||
| NOTIFICATION_SEC_INTERVAL: 20 | ||
| NOTIFICATION_LIMIT: 500 | ||
|
|
||
| SUBPATH: ${SUBPATH:-/} | ||
| DISABLE_2FA: yes | ||
| LOG_NOTIFICATIONS_IN_DB: no | ||
| DB_CONN_MAX_AGE: "0" | ||
| DB_POOL_ENABLED: True | ||
| OTEL_SDK_DISABLED: true | ||
| healthcheck: | ||
| test: ["CMD", "maykin-common", "health-check"] | ||
| interval: 30s | ||
| timeout: 5s | ||
| retries: 5 | ||
| # This should allow for enough time for migrations to run before the max | ||
| # retries have passed. This healthcheck in turn allows other containers | ||
| # to wait for the database migrations. | ||
| start_period: 30s | ||
| ports: | ||
| - 8008:8000 | ||
| volumes: &app-volumes | ||
| - media:/app/media # Shared media volume to get access to saved OAS files | ||
| depends_on: | ||
| notificaties-db: | ||
| condition: service_healthy | ||
| notificaties-web-init: | ||
| condition: service_completed_successfully | ||
| networks: | ||
| - open-notificaties-dev | ||
|
|
||
| notificaties-web-init: | ||
| image: openzaak/open-notificaties:${OPENNOTIFICATIES_VERSION:-1.16.2} | ||
| environment: | ||
| <<: *app-env | ||
| RUN_SETUP_CONFIG: ${RUN_SETUP_CONFIG:-true} | ||
| command: /setup_configuration.sh | ||
| depends_on: | ||
| notificaties-db: | ||
| condition: service_healthy | ||
| notificaties-redis: | ||
| condition: service_started | ||
| volumes: | ||
| - ./setup_configuration:/app/setup_configuration | ||
| networks: | ||
| - open-notificaties-dev | ||
|
|
||
| notificaties-celery: | ||
| image: openzaak/open-notificaties:${OPENNOTIFICATIES_VERSION:-1.16.2} | ||
| environment: *app-env | ||
| command: /celery_worker.sh | ||
| healthcheck: | ||
| test: [ | ||
| "CMD", | ||
| "maykin-common", | ||
| "worker-health-check", | ||
| "--liveness-file=/app/tmp/celery_worker_event_loop.live", | ||
| "--max-age=70", | ||
| "--broker=redis://redis:6379/0", | ||
| "--worker-name=celery@docker", | ||
| ] | ||
| interval: 60s | ||
| timeout: 5s | ||
| retries: 3 | ||
| start_period: 10s | ||
| volumes: *app-volumes | ||
| depends_on: | ||
| - notificaties-web | ||
| networks: | ||
| - open-notificaties-dev | ||
|
|
||
| notificaties-celery-beat: | ||
| image: openzaak/open-notificaties:${OPENNOTIFICATIES_VERSION:-1.16.2} | ||
| environment: *app-env | ||
| command: /celery_beat.sh | ||
| healthcheck: | ||
| test: [ | ||
| "CMD", | ||
| "maykin-common", | ||
| "beat-health-check", | ||
| "--file=/app/tmp/celery_beat.live", | ||
| "--max-age=120" | ||
| ] | ||
| interval: 60s | ||
| timeout: 5s | ||
| retries: 5 | ||
| depends_on: | ||
| - notificaties-celery | ||
| - notificaties-db | ||
| - notificaties-redis | ||
| volumes: *app-volumes | ||
| networks: | ||
| - open-notificaties-dev | ||
|
|
||
| notificaties-celery-flower: | ||
| image: openzaak/open-notificaties:${OPENNOTIFICATIES_VERSION:-1.16.2} | ||
| environment: *app-env | ||
| command: /celery_flower.sh | ||
| ports: | ||
| - 5555:5555 | ||
| depends_on: | ||
| - notificaties-redis | ||
| - notificaties-celery | ||
| healthcheck: | ||
| test: [ | ||
| "CMD", | ||
| "maykin-common", | ||
| "health-check", | ||
| "--endpoint=http://localhost:5555/" | ||
| ] | ||
| networks: | ||
| - open-notificaties-dev | ||
|
|
||
| volumes: | ||
| media: | ||
| notificaties-db: | ||
|
|
||
| networks: | ||
| open-notificaties-dev: | ||
| name: open-notificaties-dev | ||
2 changes: 2 additions & 0 deletions
2
...d/docker-services/opennotificaties/postgres.entrypoint-initdb.d/0001-opennotificaties.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| CREATE ROLE opennotificaties WITH LOGIN; | ||
| CREATE DATABASE opennotificaties WITH OWNER opennotificaties; |
64 changes: 64 additions & 0 deletions
64
backend/docker-services/opennotificaties/setup_configuration/data.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| zgw_consumers_config_enable: true | ||
| zgw_consumers: | ||
| services: | ||
| - identifier: open-zaak-auth | ||
| label: Open Zaak Auth | ||
| api_root: http://localhost:8003/autorisaties/api/v1 | ||
| api_type: ac | ||
| auth_type: zgw | ||
| client_id: open-notificaties | ||
| secret: this-secret-is-very-secure | ||
| - identifier: open-notificaties-api | ||
| label: Open Notificaties | ||
| api_root: http://localhost:8008/api/v1 | ||
| api_type: nrc | ||
| auth_type: zgw | ||
| client_id: open-notificaties | ||
| secret: this-secret-is-very-secure | ||
|
|
||
| autorisaties_api_config_enable: true | ||
| autorisaties_api: | ||
| authorizations_api_service_identifier: open-zaak-auth | ||
|
|
||
| vng_api_common_credentials_config_enable: true | ||
| vng_api_common_credentials: | ||
| items: | ||
| - identifier: open-notificaties | ||
| secret: this-secret-is-very-secure | ||
| - identifier: open-product | ||
| secret: this-secret-is-very-secure | ||
| - identifier: open-zaak | ||
| secret: this-secret-is-very-secure | ||
|
|
||
| notifications_config_enable: true | ||
| notifications_config: | ||
| notification_delivery_max_retries: 7 | ||
| notification_delivery_retry_backoff: 25 | ||
| notification_delivery_retry_backoff_max: 52000 | ||
| notification_delivery_base_factor: 4 | ||
| notifications_api_service_identifier: open-notificaties-api | ||
|
|
||
| notifications_subscriptions_config_enable: true | ||
| notifications_subscriptions_config: | ||
| items: | ||
| - uuid: aa4be394-9f89-4291-a0e8-f18b4e7b5ae1 | ||
| channels: | ||
| - autorisaties | ||
| identifier: open-notificaties | ||
| callback_url: http://localhost:8008/api/v1/callbacks | ||
| client_id: open-notificaties | ||
| secret: this-secret-is-very-secure | ||
|
|
||
| notifications_abonnementen_config_enable: true | ||
| notifications_abonnementen_config: | ||
| items: | ||
| - uuid: c7fea6b4-451d-49b8-8dbc-39c9264746ad | ||
| callback_url: http://localhost:8003/events | ||
| cloudevent_filters: | ||
| # TODO: this also needs to include the product date-change notification | ||
| - nl.overheid.zaken.zaak-gekoppeld | ||
| - nl.overheid.zaken.zaak-ontkoppeld | ||
| auth_type: zgw | ||
| auth_client_id: open-zaak | ||
| secret: this-secret-is-very-secure | ||
| send_cloudevents: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
backend/docker-services/openproduct/setup_configuration/data.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| zgw_consumers_config_enable: true | ||
| zgw_consumers: | ||
| services: | ||
| - identifier: open-notificaties-api | ||
| label: Open Notificaties API | ||
| api_root: http://localhost:8008/api/v1 | ||
| api_type: nrc | ||
| auth_type: zgw | ||
| client_id: open-product | ||
| secret: this-secret-is-very-secure | ||
|
|
||
| notifications_config_enable: true | ||
| notifications_config: | ||
|
viktorvanwijk marked this conversation as resolved.
|
||
| notification_delivery_max_retries: 7 | ||
| notification_delivery_retry_backoff: 25 | ||
| notification_delivery_retry_backoff_max: 52000 | ||
| notification_delivery_base_factor: 4 | ||
| notifications_api_service_identifier: open-notificaties-api | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.