Skip to content

Commit

Permalink
Allowing disabling of notifications via NOTIFICATIONS_DISABLED envvar
Browse files Browse the repository at this point in the history
updating admin-index fixture to show notifications-api-common configurationsettings
  • Loading branch information
alextreme committed Aug 5, 2023
1 parent 7044149 commit d481f5f
Show file tree
Hide file tree
Showing 3 changed files with 194 additions and 187 deletions.
33 changes: 12 additions & 21 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,23 @@ services:
# postgres image
volumes:
- ./docker-init-db.sql:/docker-entrypoint-initdb.d/init_db.sql
- db:/var/lib/postgresql/data

web:
build: .
environment:
environment: &web-env
- DJANGO_SETTINGS_MODULE=openklant.conf.docker
- IS_HTTPS=no
- DB_NAME=openklant
- DB_USER=openklant
- DB_NAME=postgres
- DB_USER=postgres
- DB_HOST=db
- ALLOWED_HOSTS=*
- CACHE_DEFAULT=redis:6379/0
- CACHE_AXES=redis:6379/0
- SECRET_KEY=${SECRET_KEY:-django-insecure-$8s@b*ds4t84-q_2#c0j0506@!l2q6r5_pq5e!vm^_9c*#^66b}
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
- NOTIFICATIONS_DISABLED=True
ports:
- 8000:8000
depends_on:
Expand All @@ -37,26 +40,14 @@ services:

celery:
build: .
environment: *web-env
command: /celery_worker.sh
depends_on:
- db
- redis
- web

volumes:
db:
log:

# See: src/openklant/conf/docker.py
# Optional containers below:
# elasticsearch:
# # NOTE: No persistance storage configured.
# # See: https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
# image: docker.elastic.co/elasticsearch/elasticsearch:6.2.4
# container_name: elasticsearch
# environment:
# - discovery.type=single-node
# - cluster.routing.allocation.disk.threshold_enabled=false
# ports:
# - 9200:9200
# redis:
# # NOTE: No persistance storage configured.
# # See: https://hub.docker.com/_/redis/
# image: redis
# ports:
# - 6379:6379
1 change: 1 addition & 0 deletions src/openklant/conf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@
# settings for sending notifications
KLANTEN_NOTIFICATIONS_KANAAL = "klanten"
CONTACTMOMENTEN_NOTIFICATIONS_KANAAL = "contactmomenten"
NOTIFICATIONS_DISABLED = config("NOTIFICATIONS_DISABLED", default=False)

# Generating the schema, depending on the component
subpath = config("SUBPATH", None)
Expand Down
Loading

0 comments on commit d481f5f

Please sign in to comment.