Skip to main content
Version: 2.x (upcoming)

Notification service

These are the settings of the notification service, read from app-<PROFILE>.env in its config folder (config-files/opencdmp/notification/config/app-test.env in the Docker example).

Authentication & core settings​

Env VariableDescriptionRequiredDefault ValueExample
IDP_ISSUER_URIKeycloak realm URL, exactly as the issuer of its tokens (the same value as in the API service).Yes-https://opencdmp.example.org/auth/realms/OpenCDMP
SECURITY_AUDIENCEAudience that tokens must carry: the notification client scope.Yes-notification
CORS_ALLOWED_ORIGINOrigin of the webapp (scheme, host, and port) that may call the service. One origin.Yes-https://opencdmp.example.org

Database configuration​

Env VariableDescriptionRequiredDefault ValueExample
DB_CONNECTION_STRINGJDBC address of the opencdmp database, the database of the API service.Yes-jdbc:postgresql://opencdmp.postgres:5432/opencdmp
DB_USERDatabase user. It reads and writes the tables of the service, which the API service creates (see a user per service).Yes-opencdmp_services
DB_PASSWORDPassword of that user.Yes-<db-password>

Mail configuration​

Env VariableDescriptionRequiredDefault ValueExample
MAIL_HOSTSMTP server host.Yes-smtp.example.org
MAIL_PORTSMTP server port.Yes-587
MAIL_ADDRESSSender address of the emails.Yes-opencdmp@example.org
MAIL_AUTHtrue to sign in to the SMTP server with MAIL_USERNAME and MAIL_PASSWORD.Yes-true
MAIL_TLStrue to upgrade the connection with STARTTLS.Yes-true
MAIL_USERNAMESMTP user.Yes¹-opencdmp@example.org
MAIL_PASSWORDPassword of that user.Yes¹-<smtp-password>

¹ Needs a value only when MAIL_AUTH is true. The service refuses to start when one of the MAIL_* variables is missing, so define every one, and leave unused ones empty (MAIL_USERNAME=), as the Docker example does. With an empty MAIL_HOST the service starts, but every email fails.

RabbitMQ configuration​

Env VariableDescriptionRequiredDefault ValueExample
QUEUE_ENABLEDBoolean value to connect to RabbitMQ and consume the events of the API service.Notruetrue
QUEUE_APP_IDRabbitMQ application id of the service.Yes-opencdmp-notification
QUEUE_NAMEQueue of the service.Yes-opencdmp_notification_inbox_queue
QUEUE_EXCHANGEExchange, the same as QUEUE_EXCHANGE of the API service.Yes-opencdmp_queue
RABBIT_HOSTRabbitMQ host.Yes-opencdmp.rabbitmq
RABBIT_PORTRabbitMQ port.Yes-5672
RABBIT_USERRabbitMQ user.Yes-opencdmp
RABBIT_PASSPassword of that user.Yes-<rabbitmq-password>

Logging configuration​

Env VariableDescriptionRequiredDefault ValueExample
LOGGING_CONFIG_PATHLogback configuration file.Noclasspath:logging/logback.xmlfile:/config/logback.xml
LOGGING_DEFAULT_LOG_LEVELLevel of the framework loggers: ERROR, WARN, INFO, or DEBUG.NoWARNINFO
LOGGING_PATHFolder of the log files logging.log and auditing.log.No/logs/logs

See also​