MO2.2.3 Environment variables - openimis-be_py
Environment Variables
ENV | Values | Description |
|---|---|---|
MODE | DEV, PROD | This is the mode of running the application. There are 2 modes available. DEV for the Development mode and PROD for the production mode. Certain settings will be changed according to the mode. Such as in the PROD mode, mutation will run asynchronously and synchronously otherwise. Same applies to DEBUG, it will be OFF in PROD and TRUE otherwise. |
DB_ENGINE | django.db.backends.postgresql, mssql | Currently openIMIS supports 2 databases, as the values suggested, postgres and mssql. |
DEMO_DATASET | true | Define if the database should be initiated with demo dataset. Comment for empty database. |
DB_DEFAULT | String | String This variables sets the default database engine for the system. Possible values: postgresql, mssql. Default: postgresql. |
DB_HOST | String | Define the name of your database server |
DB_PORT | Integer | Define the port on which your database accepts the connection |
DB_NAME | String | Define the name of the openIMIS database |
DB_USER | String | Configure the username with which you want to connect to the database |
DB_PASSWORD | String | Configure the database password |
DB_TEST_NAME | String | If you are developing unit tests then this setting will create the testing database as per the name set |
NO_DATABASE | true, false | If set to true, it will use sqlite.db3 as a database |
DB_OPTIONS | String | Define any additional database options |
PSQL_DB_ENGINE | String | Define a library to use to connect with postgres database. Default value is django.db.backends.postgresql |
MSSQL_DB_ENGINE | String | Define a library to use to connect with MS SQL database Default value is mssql. |
SITE_ROOT | String | Site root that will prefix all exposed endpoints. It's required when working with openIMIS frontend. For example, if the value is set |
DJANGO_LOG_LEVEL | INFO, WARNING, ERROR, DEBUG | Define the level of logs |
DJANGO_LOG_HANDLER | console, debug-log | Depending on the value set, application will print the logs |
DJANGO_DB_LOG_HANDLER | console, debug-log | Depending on the value set, application will print the logs |
PHOTO_ROOT_PATH | String | Define the path for the photos of insurees. This setting is used in the Insuree module. The value set here will be overwritten by the InsureeConfig file. |
DJANGO_MIGRATE | True, False | Based on the value set, application runs the migration command before starting up. If the SITE_ROOT value is set to api then the migration will always run regardless of the value |
SCHEDULER_AUTOSTART | True, False | All the modules will be searched for the scheduled tasks, if the value is set to True |
OPENSEARCH_HOSTS | String | Define the opensearch hosts, comma separated http://opensearch:9200 |
OPENSEARCH_ADMIN | String | Define the login name for open search |
OPENSEARCH_PASSWORD | String | Define the admin password to login to open search |
BE_BRANCH | String | Define the github branch for the Backend form which you wan to install the module. Default is develop. |
FE_BRANCH | String | Define the github branch for the Front-end form which you wan to install the module. Default is develop. |
DB_BRANCH | String | Define the github branch for the Database form which you wan to install the module. Default is develop. |
LOKALISE_APIKEY | String | Set the lokalise api key. Obtain this key form the lokalise project to be able to use the lokalise-upload |
OPENIMIS_CONF_JSON | String | Define the path for the openimis config file. If not set the default config from the root folder will be taken. |
DB_QUERIES_LOG_FILE | String | Define the path of the file to save the database queries. Default is db-queries.log |
DEBUG_LOG_FILE | String | Define the path of the file to save the debug log. Default is debug.log |
SENTRY_DSN | String | Set the unique Sentry DSN. This can be obtained from your Sentry account dashboard |
SENTRY_SAMPLE_RATE | 0-1 | This configuration allows you to to control the rate at which traces are collected. Values are between 0 and 1. 0 means no traces will be collected (tracing is disabled). 1 means traces will be collected for every request. Any value between 0 and 1 represents the probability of capturing trace. For instance, a value 0.3 means that approximately 30% of requests will have traces collected. |
IS_SENTRY_ENABLED | True, False | Defines if the Sentry error tracking and monitoring functionality is enabled or disabled. |
SITE_URL | String | Define the base url. This is used to create links in FHIR module |
SITE_FRONT | String | Define base uri for the frontend |
FRONTEND_URL | String | Define the frontend URL if not aligned with SITE_URL/SITE_FRONT |
SECRET_KEY | String | This is used internally by Django. Make sure to set it up in production server. |
REMOTE_USER_AUTHENTICATION | true, false | Set it to true if you want to enable the RemoteUserBackend as an authentication backend in Django. By default it's false |
CELERY_BROKER_URL | String | Define a message broker url for celery. Default value is amqp://rabitmq |
CHANNELS_HOST | String | Set the host for the Django Channel. Default value is amqp://guest:guest@127.0.0.1/ |
EMAIL_HOST | String | Define an Email Host. Default value is localhost |
EMAIL_PORT | Integer | Define a valid port for the email server |
EMAIL_HOST_USER | String | Set the username to send emails |
EMAIL_HOST_PASSWORD | String | Set the password for the email |
EMAIL_USE_TLS | True, False | Configure the TLS setting. Default value is False |
EMAIL_USE_SSL | True, False | Configure the SSL settings for the emails. Default value is False |
DATA_UPLOAD_MAX_MEMORY_SIZE | Integer | Define the upload size allowed in bytes via the POST request. Default is 10 MB |
MASTER_DATA_PASSWORD | String | This setting is used in exporting entities. Configure the password to zip the exported entities. |
DJANGO_SETTINGS_MODULE | String | Define the python import path to settings module for Django project. By default it is set to openIMIS.settings |
OPEHNHIM_URL | String | This setting is used in fhir module. Define the url for openHIM |
OPEHNHIM_USER | String | This setting is used in fhir module. Define the user for openHIM |
OPEHNHIM_PASSWORD | String | This setting is used in fhir module. Define the password for openHIM |
OPENIMIS_CONF | String | Define a path to the config file. By default it reads from ../openimis.json |
CLAIMDOC_TOKEN | String | Used in backend caching. Define a token to communicate with the remote server. Default is set to 'TestToken' |
CACHE_BACKEND | String | Specifies the caching backend to be used. Default is set to PyMemcached. |
CACHE_URL | String | Defines the location of the cache backend. Default is |
CACHE_OPTIONS | String | A JSON string representing a dictionary of additional options passed to the cache backend. Empty by default |
RATELIMIT_CACHE | String | The cache alias to use for rate limiting. Defaults to |
RATELIMIT_KEY | String | Key to identify the client for rate limiting; |
RATELIMIT_RATE | String | Rate limit value (e.g., |
RATELIMIT_METHOD | String | HTTP methods to rate limit; |
RATELIMIT_GROUP | String | Group name for the rate limit. Defaults to |
RATELIMIT_SKIP_TIMEOUT | Boolean | Whether to skip rate limiting during cache timeout. Defaults to |
HOSTS | String | Define the trusted domains that are used for PROD CORS and CSRF protection, separated by commas. Defaults to |
Did you encounter a problem or do you have a suggestion?
Please contact our Service Desk
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. https://creativecommons.org/licenses/by-sa/4.0/