Update environment variables page
Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com>
This commit is contained in:
parent
1796c41532
commit
d2aadc4c40
@ -1,45 +1,58 @@
|
|||||||
# Environment Variables for Micro-Service Applications
|
# 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.
|
This document provides a brief description of the environment variables that are used by the micro-service applications developed and maintained 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.
|
The following table lists the environment variables that are common to all DIT micro-service applications, along with their descriptions.
|
||||||
|
|
||||||
| Environment Variable | Description |
|
| Environment Variable | Description |
|
||||||
| :--------------------------------- | :----------------------------------------------------------------------------- |
|
| :------------------------- | :------------------------------------------------------------------------ |
|
||||||
| DATABASE\_\_HOST | The host name or IP address of the database server |
|
| CAS\_\_URL | The URI format for the connection string of database server |
|
||||||
| DATABASE\_\_USERNAME | The username for accessing the database |
|
| CAS\_\_M2M_CLIENT_ID | The URI format for the connection string of database server |
|
||||||
| DATABASE\_\_PASSWORD | The password for accessing the database |
|
| CAS\_\_M2M_CLIENT_SECRET | The URI format for the connection string of database server |
|
||||||
| DATABASE\_\_NAME | The name of the database |
|
| DATABASE\_\_URL | The URI format for the connection string of database server |
|
||||||
| DATABASE\_\_PORT | The port number of the database server |
|
| DATABASE\_\_HOST | The host name or IP address of the database server |
|
||||||
| S3\_\_REGION | The AWS region of the S3 bucket |
|
| DATABASE\_\_USERNAME | The username for accessing the database |
|
||||||
| S3\_\_ENDPOINT | The endpoint URL of the S3 bucket |
|
| DATABASE\_\_PASSWORD | The password for accessing the database |
|
||||||
| S3\_\_ACCESS_KEY | The access key ID for accessing the S3 bucket |
|
| DATABASE\_\_NAME | The name of the database |
|
||||||
| S3\_\_SECRET_KEY | The secret access key for accessing the S3 bucket |
|
| DATABASE\_\_PORT | The port number of the database server |
|
||||||
| S3\_\_BUCKET | The name of the S3 bucket |
|
| S3\_\_REGION | The AWS region of the S3 bucket |
|
||||||
| SIDEKIQ\_\_USERNAME | The username for accessing the Sidekiq web interface |
|
| S3\_\_ENDPOINT | The endpoint URL of the S3 bucket |
|
||||||
| SIDEKIQ\_\_PASSWORD | The password for accessing the Sidekiq web interface |
|
| S3\_\_ACCESS_KEY_ID | The access key ID for accessing the S3 bucket |
|
||||||
| REDIS_SENTINEL\_\_HOST | The host name or IP address of the Redis Sentinel server |
|
| S3\_\_SECRET_ACCESS_KEY | The secret access key for accessing the S3 bucket |
|
||||||
| REDIS_SENTINEL\_\_PORT | The port number of the Redis Sentinel server |
|
| S3\_\_SELF_BUCKET | The name of the S3 bucket used for storing self-related files |
|
||||||
| REDIS_SENTINEL\_\_PASSWORD | The password for accessing the Redis Sentinel server |
|
| S3\_\_UPLOADS_API_BUCKET | The name of the S3 bucket used for storing uploaded files via Uploads API |
|
||||||
| REDIS_SENTINEL\_\_MASTER | The name of the Redis Sentinel master |
|
| SIDEKIQ\_\_USERNAME | The username for accessing the Sidekiq web interface |
|
||||||
| REDIS\_\_PASSWORD | The password for accessing the Redis server |
|
| SIDEKIQ\_\_PASSWORD | The password for accessing the Sidekiq web interface |
|
||||||
| REDIS\_\_DB | The number of the Redis database |
|
| REDIS_SENTINEL\_\_HOST | The host name or IP address of the Redis Sentinel server |
|
||||||
| SIDEKIQ\_\_REDIS_DB | The number of the Redis database for Sidekiq |
|
| REDIS_SENTINEL\_\_PORT | The port number of the Redis Sentinel server |
|
||||||
| SENTRY\_\_DSN | The data source name (DSN) for Sentry error tracking |
|
| REDIS_SENTINEL\_\_PASSWORD | The password for accessing the Redis Sentinel server |
|
||||||
| SENTRY\_\_TRACE_RATE | The sampling rate for Sentry performance tracing |
|
| REDIS_SENTINEL\_\_MASTER | The name of the Redis Sentinel master |
|
||||||
| SENTRY\_\_ENVIRONMENT | The environment name for Sentry error tracking |
|
| REDIS\_\_PASSWORD | The password for accessing the Redis server |
|
||||||
| GATEWAY\_\_CERTIFICATE | The certificate file for accessing the gateway service |
|
| REDIS\_\_DB | The number of the Redis database |
|
||||||
| RABBITMQ\_\_URL | The URL the RabbitMQ server |
|
| SIDEKIQ\_\_REDIS_DB | The number of the Redis database for Sidekiq |
|
||||||
| RABBITMQ\_\_HOST | The host name or IP address of the RabbitMQ server |
|
| SENTRY\_\_DSN | The data source name (DSN) for Sentry error tracking |
|
||||||
| RABBITMQ\_\_PORT | The port number of the RabbitMQ server |
|
| SENTRY\_\_TRACE_RATE | The sampling rate for Sentry performance tracing |
|
||||||
| RABBITMQ\_\_VHOST | The virtual host name of the RabbitMQ server |
|
| SENTRY\_\_ENVIRONMENT | The environment name for Sentry error tracking |
|
||||||
| RABBITMQ\_\_USERNAME | The username for accessing the RabbitMQ server |
|
| GATEWAY\_\_CERTIFICATE | The certificate file for accessing the gateway service |
|
||||||
| RABBITMQ\_\_PASSWORD | The password for accessing the RabbitMQ server |
|
| RABBITMQ\_\_URL | The URL the RabbitMQ server |
|
||||||
| RABBITMQ\_\_MAX_ATTEMPTS | The maximum number of attempts for retrying failed messages in RabbitMQ queues |
|
| RABBITMQ\_\_HOST | The host name or IP address of the RabbitMQ server |
|
||||||
| RABBITMQ\_\_RETRY_DELAY_IN_SECONDS | The delay in seconds between each retry attempt in RabbitMQ queues |
|
| RABBITMQ\_\_PORT | The port number of the RabbitMQ server |
|
||||||
| MONGO\_\URL | The MongoDB Connection string |
|
| RABBITMQ\_\_VHOST | The virtual host name of the RabbitMQ server |
|
||||||
| SERIVCE\_\_[Name of service]\_URL | The URL of other services |
|
| RABBITMQ\_\_USERNAME | The username for accessing the RabbitMQ server |
|
||||||
| EVENTBUS\_\_EXCHANGE_NAME | The name of the exchange for event bus |
|
| RABBITMQ\_\_PASSWORD | The password for accessing the RabbitMQ server |
|
||||||
| EMAIL_TEMPLATE_ID\_\_[action] | The database ID of the email template |
|
| RABBITMQ\_\_EXCHANGE_NAME | The name of the exchange for RabbitMQ server |
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
## Environment Variables for Micro-Service Applications
|
||||||
|
|
||||||
|
1. Use double underscores (\_\_) to separate words in the variable name.
|
||||||
|
2. Use all uppercase letters for the variable name.
|
||||||
|
3. Use descriptive names for the variable that indicate their purpose or usage.
|
||||||
|
4. Use consistent naming across all microservice applications developed by DIT.
|
||||||
|
5. Store environment variables securely, using an encrypted secrets store, such as HashiCorp Vault or Amazon Secrets Manager.
|
||||||
|
6. Avoid hard-coding sensitive information, such as passwords or API keys, in the code.
|
||||||
|
|
||||||
|
## Conclusion
|
||||||
|
|
||||||
|
The standard naming convention for environment variables used by microservice applications developed and maintained by the Department of Information & Technology (DIT) has been outlined in this document. Following these guidelines will ensure consistency and clarity across all microservice applications developed by DIT.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user