diff --git a/brostar_api/settings.py b/brostar_api/settings.py index 340128b..9c13064 100644 --- a/brostar_api/settings.py +++ b/brostar_api/settings.py @@ -1,6 +1,8 @@ import os from pathlib import Path +import sentry_sdk + # Environment variables can get a value from an .env file via docker-compose. # In development, you'll need to set the NENS_AUTH_* ones. FIELD_ENCRYPTION_KEY = os.getenv( @@ -17,6 +19,7 @@ DATABASE_HOST = os.getenv("DATABASE_HOST", "db") DATABASE_USER = os.getenv("DATABASE_USER", "brostar") DATABASE_PASSWORD = os.getenv("DATABASE_PASSWORD", "brostar") +SENTRY_DSN = os.getenv("SENTRY_DSN") # Not required, only used in staging/production. # Convert the environment variable (which is a string) to a boolean. DEBUG = DEBUG_ENV.lower() == "true" # True is the default @@ -206,6 +209,10 @@ # TODO: fix celery env settings CELERY_BROKER_URL = "redis://redis:6379/0" +if SENTRY_DSN: + # SENTRY_DSN will only be set on staging/production, btw. + sentry_sdk.init(dsn=SENTRY_DSN) + # BRO SETTINGS BRO_UITGIFTE_SERVICE_URL = "https://publiek.broservices.nl" BRONHOUDERSPORTAAL_URL = "https://acc.bronhouderportaal-bro.nl" diff --git a/requirements.txt b/requirements.txt index 175217d..77e8010 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,25 +2,26 @@ --extra-index-url https://packages.lizard.net # TODO: dependencies +celery django == 5.0.1 -psycopg2-binary -djangorestframework django-cors-headers +django-encrypted-model-fields +django-filter +djangorestframework drf-yasg -celery -redis flower -requests markdown +nens-auth-client +psycopg2-binary pytest pytest-django -xmltodict python-dotenv -django-encrypted-model-fields -django-filter -nens-auth-client +redis +requests +sentry-sdk[django] whitenoise +xmltodict # development tools -ruff coverage +ruff