mirror of
https://github.com/suitenumerique/messages.git
synced 2026-04-26 01:24:56 +02:00
* ✨(backend) add base django-prometheus metrics * ✨(backend) add prometheus metrics, add the message by status metric * ✨(backend) Add more metrics on attachement + add 0 by default for statuses * 🚨(backend) ignore import-outside-toplevel for collector * 🚨(backend) add all docstring + don't access private properties * 🔒️(backend) add basic auth to /metrics route * 🚸(backend) use labels instead of hard-coding statuses in metric * 📝(backend) document prometheus * 🎨(backend) lint * ✅(backend) add first tests for prometheus * 🚚(backend) move prometheus endpoint to api/<ver>/prometheus/metrics, change middlewarename * ✅(backend) add attachment tests for prometheus metrics * 🐛(backend) actually allow disabling prometheus * 🎨(backend) improve logic in mw * 🎨(backend) small review fixes * 🚨(backend) lint * 🐛(backend) Remove sha256 from factory * 🎨(backend) nitpicks + linter fixes * 🐛(poetry) remove duplicate prometheus package in dev deps * 🐛(poetry) add missing dep * 🐛(prom) make tests more reliable, disable by default + misc fixes * 📝(prom) fix docstring in tests --------- Co-authored-by: Stanislas Bruhiere <stanislas@bruhiere.fr>
91 lines
2.4 KiB
Plaintext
91 lines
2.4 KiB
Plaintext
# App database configuration
|
|
DB_HOST=postgresql
|
|
DB_NAME=messages
|
|
DB_USER=user
|
|
DB_PASSWORD=pass
|
|
DB_PORT=5432
|
|
|
|
# Django
|
|
DJANGO_ALLOWED_HOSTS=*
|
|
DJANGO_SECRET_KEY=ThisIsAnExampleKeyForDevPurposeOnly
|
|
DJANGO_SETTINGS_MODULE=messages.settings
|
|
DJANGO_SUPERUSER_PASSWORD=admin
|
|
|
|
# Logging
|
|
# Set to DEBUG level for dev only
|
|
LOGGING_LEVEL_HANDLERS_CONSOLE=INFO
|
|
LOGGING_LEVEL_LOGGERS_ROOT=INFO
|
|
LOGGING_LEVEL_LOGGERS_APP=INFO
|
|
|
|
# Prometheus
|
|
ENABLE_PROMETHEUS=0
|
|
PROMETHEUS_API_KEY=ExamplePrometheusApiKey
|
|
|
|
# Python
|
|
PYTHONPATH=/app
|
|
|
|
# Messages settings
|
|
|
|
# Mail
|
|
DJANGO_EMAIL_BRAND_NAME="La Suite territoriale"
|
|
DJANGO_EMAIL_HOST="mailcatcher"
|
|
DJANGO_EMAIL_LOGO_IMG="http://localhost:8900/assets/logo-suite-numerique.png"
|
|
DJANGO_EMAIL_PORT=1025
|
|
|
|
# Media
|
|
STORAGES_STATICFILES_BACKEND=django.contrib.staticfiles.storage.StaticFilesStorage
|
|
AWS_S3_ENDPOINT_URL=http://minio:9000
|
|
AWS_S3_ACCESS_KEY_ID=messages
|
|
AWS_S3_SECRET_ACCESS_KEY=password
|
|
MEDIA_BASE_URL=http://localhost:8902
|
|
|
|
# OIDC
|
|
OIDC_OP_JWKS_ENDPOINT=http://keycloak:8802/realms/messages/protocol/openid-connect/certs
|
|
OIDC_OP_AUTHORIZATION_ENDPOINT=http://localhost:8902/realms/messages/protocol/openid-connect/auth
|
|
OIDC_OP_TOKEN_ENDPOINT=http://keycloak:8802/realms/messages/protocol/openid-connect/token
|
|
OIDC_OP_USER_ENDPOINT=http://keycloak:8802/realms/messages/protocol/openid-connect/userinfo
|
|
|
|
OIDC_RP_CLIENT_ID=messages
|
|
OIDC_RP_CLIENT_SECRET=ThisIsAnExampleKeyForDevPurposeOnly
|
|
OIDC_RP_SIGN_ALGO=RS256
|
|
OIDC_RP_SCOPES="openid email"
|
|
|
|
LOGIN_REDIRECT_URL=http://localhost:8900
|
|
LOGIN_REDIRECT_URL_FAILURE=http://localhost:8900
|
|
LOGOUT_REDIRECT_URL=http://localhost:8900
|
|
|
|
OIDC_REDIRECT_ALLOWED_HOSTS=["http://localhost:8902", "http://localhost:8900"]
|
|
OIDC_AUTH_REQUEST_EXTRA_PARAMS={"acr_values": "eidas1"}
|
|
|
|
# keycloak
|
|
IDENTITY_PROVIDER=keycloak
|
|
KEYCLOAK_REALM=messages
|
|
KEYCLOAK_URL=http://keycloak:8802
|
|
KEYCLOAK_CLIENT_ID=rest-api
|
|
KEYCLOAK_CLIENT_SECRET=ServiceAccountClientSecretForDev
|
|
KEYCLOAK_GROUP_PATH_PREFIX=/maildomain-
|
|
|
|
# Frontend
|
|
FRONTEND_THEME=dsfr
|
|
|
|
# Messages
|
|
MESSAGES_TESTDOMAIN=example.local
|
|
MESSAGES_TESTDOMAIN_MAPPING_BASEDOMAIN=example.com
|
|
MTA_OUT_MODE=relay
|
|
MTA_OUT_SMTP_HOST=mailcatcher:1025
|
|
MDA_API_SECRET=my-shared-secret-mda
|
|
SALT_KEY=ThisIsAnExampleSaltForDevPurposeOnly
|
|
|
|
# AI
|
|
AI_BASE_URL=
|
|
AI_API_KEY=
|
|
AI_MODEL=
|
|
|
|
# AI features
|
|
AI_FEATURE_SUMMARY_ENABLED=False
|
|
AI_FEATURE_AUTOLABELS_ENABLED=False
|
|
|
|
# Interoperability
|
|
# Drive - https://github.com/suitenumerique/drive
|
|
DRIVE_BASE_URL=
|