Using Implementation specific Configuration (docker)

Detailed explanation about Bahmni configuration can be found at Configuration 101.

Bahmni uses configuration in the form of JSON and supports configuration across multiple services. The default configuration comes with standard-config (for Bahmni Standard) and clinic-config (for Bahmni Lite) image running in bahmni-config service. The configurations will be shared across services like OpenMRS, bahmni-web, openelis, reports by using docker volumes.To override default-config with your implementation specific configuration, it is recommended to build a docker image of your config and use it with the bahmni-config service.

The steps to build the docker image for your implementation specific config can be found here. Once you have the docker image built you need to update Bahmni Config Environment Variables in the .env file.

Local development on config

If you are doing local development on configuration, you can mount your local folder also. Follow the step below.

  1. Update the CONFIG_VOLUME variable in the .env file with the path of your local config folder.

  2. Comment bahmni-config service in docker-compose.yml

  3. Update / Start the containers by running docker-compose up -d. If you use any profile, pass the profile option as well.

You can also refer to this training video on how to perform the above: https://www.youtube.com/watch?v=eDab30kY54w&list=PLzknGpbejfSzEB2dT87mexJaBUsXNuZkD&index=4

 

Breaking changes when using existing config with Bahmni on Docker:

  1. Bahmni Reports SQL path for Custom SQL files:
    In CentOS based Bahmni installation, the sqlPath attribute for custom sql files would have /var/www/bahmni_config/... as the path. Now with docker setup, the config folder is mounted at /etc/bahmni_config in the reports container. So, replace the value of sqlPath attribute in report.json to start with /etc/bahmni_config rather than /var/www/bahmni_config

  2. Liquibase Migrations for OpenMRS:
    In CentOS based Bahmni installation, adding custom liquibase migration for OpenMRS are allowed through bahmni_config/openmrs/migrations . With the dockerised setup and upgraded OpenMRS openmrs-module-initializer module is packaged with the distribution. So new liquibase migrations to be added in masterdata/configuration/liquibase directory in the bahmni-config.

 

 

The Bahmni documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)