dit-digital-service-manual/docs/Software Development/06-Environment Variables.md
Shakar 1796c41532
Changes s3 variables
Adds RabbitMQ__URL
Updates the description of service url

Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com>
2023-04-04 14:24:41 +03:00

5.7 KiB

Environment Variables for Micro-Service Applications

This document provides a brief description of the environment variables that are used by the micro-service applications developed by the Department of Information & Technology (DIT). These variables are used to configure various aspects of the applications, such as database connections, cloud storage access, message queue settings, etc. The environment variables follow a standard naming convention that consists of two parts: the prefix and the suffix. The prefix indicates the component or service that the variable belongs to, and the suffix indicates the specific parameter or attribute that the variable represents. For example, DATABASE__HOST is an environment variable that specifies the host name of the database server for the application.

The following table lists the environment variables that are common to all DIT micro-service applications, along with their descriptions.

Environment Variable Description
DATABASE__HOST The host name or IP address of the database server
DATABASE__USERNAME The username for accessing the database
DATABASE__PASSWORD The password for accessing the database
DATABASE__NAME The name of the database
DATABASE__PORT The port number of the database server
S3__REGION The AWS region of the S3 bucket
S3__ENDPOINT The endpoint URL of the S3 bucket
S3__ACCESS_KEY The access key ID for accessing the S3 bucket
S3__SECRET_KEY The secret access key for accessing the S3 bucket
S3__BUCKET The name of the S3 bucket
SIDEKIQ__USERNAME The username for accessing the Sidekiq web interface
SIDEKIQ__PASSWORD The password for accessing the Sidekiq web interface
REDIS_SENTINEL__HOST The host name or IP address of the Redis Sentinel server
REDIS_SENTINEL__PORT The port number of the Redis Sentinel server
REDIS_SENTINEL__PASSWORD The password for accessing the Redis Sentinel server
REDIS_SENTINEL__MASTER The name of the Redis Sentinel master
REDIS__PASSWORD The password for accessing the Redis server
REDIS__DB The number of the Redis database
SIDEKIQ__REDIS_DB The number of the Redis database for Sidekiq
SENTRY__DSN The data source name (DSN) for Sentry error tracking
SENTRY__TRACE_RATE The sampling rate for Sentry performance tracing
SENTRY__ENVIRONMENT The environment name for Sentry error tracking
GATEWAY__CERTIFICATE The certificate file for accessing the gateway service
RABBITMQ__URL The URL the RabbitMQ server
RABBITMQ__HOST The host name or IP address of the RabbitMQ server
RABBITMQ__PORT The port number of the RabbitMQ server
RABBITMQ__VHOST The virtual host name of the RabbitMQ server
RABBITMQ__USERNAME The username for accessing the RabbitMQ server
RABBITMQ__PASSWORD The password for accessing the RabbitMQ server
RABBITMQ__MAX_ATTEMPTS The maximum number of attempts for retrying failed messages in RabbitMQ queues
RABBITMQ__RETRY_DELAY_IN_SECONDS The delay in seconds between each retry attempt in RabbitMQ queues
MONGO_\URL The MongoDB Connection string
SERIVCE__[Name of service]_URL The URL of other services
EVENTBUS__EXCHANGE_NAME The name of the exchange for event bus
EMAIL_TEMPLATE_ID__[action] The database ID of the email template

In addition to these common environment variables, some applications may have specific environment variables that are related to their functionality or dependencies. These variables are prefixed with the name of the application or service that they belong to, such as TAX_CORPORATE_REGISTRATION_PORTAL_URL. These variables are documented in their respective application repositories or README files.