Getting Started Quickly with Bahmni on Docker
Installing Docker and Docker Compose
Bahmni Docker training for the community has been conducted on 15-Feb-2023 (2 days). All the training content is now publicly available in Bahmni Community YouTube channel. Please check this playlist on YouTube: https://www.youtube.com/watch?v=f7ikNL2j3Mg&list=PLzknGpbejfSzEB2dT87mexJaBUsXNuZkD&index=1
Prerequisites:
Install stable version of Git
Install latest stable versions of
docker
&docker compose
in your machine (based on your respective OS).Clone the
bahmni-docker
repository (Github Link).
Running Bahmni Lite v1.0.0
Bahmni-lite is a lightweight open-source version of Bahmni targeted towards clinics & small hospitals, which don’t need a heavy-weight HIMS, but are looking for an easy-to-use EMR & Billing software. Read more about Bahmni-lite v1.0.0 here. This version runs with Bahmni EMR UI, OpenMRS and Crater.
# Clone the Bahmni docker repo using SSH keys
git clone git@github.com:Bahmni/bahmni-docker.git
# If the above command gives error, use the HTTPs version of the command as follows:
git clone https://github.com/Bahmni/bahmni-docker.git
cd bahmni-docker/bahmni-lite
# Edit the .env file, and make the following changes
# 1. Change `COMPOSE_PROFILES=bahmni-lite` (or run with default which is `emr`)
# 2. Change `TZ` to your desired timezone (or run with the default which is `UTC`).
# 3. For remote server (if not running on localhost) for crater:
# write the IP address or domain name in the following properties (instead of localhost):
# CRATER_APP_URL, CRATER_SANCTUM_STATEFUL_DOMAINS and CRATER_SESSION_DOMAIN
# Pull latest images
docker compose pull
# Now start docker (detached mode)
docker compose up -d
Bahmni LITE should now be accessible (open browser at URL: https://localhost/). Bahmni docker is packaged with a self-signed certificate. Hence the browser may show a warning/error. This is a standard warning that browsers show when a certificate is signed by a root authority that is not already in the browsers trust store. You can bypass it for now (Add an Exception) and continue. See how you can achieve this with Chrome by typing thisisunsafe
(This is unsafe - no spaces) with your keyboard (Read more here).
Running Bahmni Standard
Bahmni Standard is the full version of Bahmni for hospitals which includes EMR (Bahmni UI + OpenMRS), OpenELIS, Odoo and PACS. Read more about differences between Bahmni Lite and Bahmni Standard here.
git clone git@github.com:Bahmni/bahmni-docker.git
cd bahmni-docker/bahmni-standard
# Change `COMPOSE_PROFILES=bahmni-standard` in the .env file (or run with default which is just `emr`)
# Pull latest images
docker compose pull
# Now start docker (detached mode)
docker compose up -d
# File Permissions Issue with Odoo
In some hosts Odoo 16 might fail to start throwing a permission denied error when using DB backup image. Run this command the first time.
docker compose exec -it --user root odoo chown -R odoo:odoo /var/lib/odoo/filestore && docker compose restart odoo
Bahmni should now be accessible (open browser at URL: https://localhost/)
First-time setup steps
Running Bahmni with the LATEST images
The .env.dev
file contains references to the `latest` images (ones which are under development and hence could be a bit unstable). To run Bahmni Lite with the latest docker images, specify the file path as .env.dev
when executing the docker compose commands (or rename the .env.dev
to .env
). It is a good idea to perform a `docker pull
` before starting. This will check if any image on your machine is out-of-date, and bring the latest version from Docker hub.
cd bahmni-docker/bahmni-lite (or) cd bahmni-docker/bahmni-standard
# Pull latest images
docker compose --env-file .env.dev pull
# Now start docker (run in detached mode)
docker compose --env-file .env.dev up -d
# You can also write this in one command as:
docker compose --env-file .env.dev pull && docker-compose --env-file .env.dev up -d
Running Bahmni EMR (minimal setup)
By default, the Bahmni docker compose has been configured to start the Bahmni EMR components (profile=`emr`) which is a minimal specification to try and explore Bahmni. This is configured in both: bahmni-standard
and bahmni-lite
.
Running a specific application
Apart from bahmni-standard
and bahmni-lite
profiles, there are individual application profiles which allows to run single applications like OpenELIS, Odoo, PACS, Crater, Metabase Analytics, etc. Read more about different profiles in Docker Compose Profiles sub-page.
Running Bahmni Analytics with Metabase & Bahmni-Mart
Bahmni now ships with Opensource metabase BI tool (Analytics), that can be used to connect to any SQL database and create reports and visualizations. By default, metabase is configured to connect with OpenMRS DB and MART DB. Mart basically is an analytics service that pulls data from OpenMRS and stores it in a postgres DB (called martDB) in a format that is easier to create reports in. Read more about Bahmni MART here: Bahmni Mart .
Metabase is accessible at: https://localhost/metabase (for credentials check the settings stored in METABASE_ADMIN_EMAIL
and METABASE_ADMIN_PASSWORD
in .env
file).
The Bahmni documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)