Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Current »

This page documents how to get Crater (open source billing software) running using docker. If you haven’t yet setup Bahmni on docker, please see the documentation here first: Getting Bahmni Quicky Started with Docker

Prerequisites:-

You can find full setup of crater and crater-atomfeed with Bahmni in this given module.

About OpenMRS

As OpenMRS is the backend service on top of which Bahmni EMR UI runs, if any patient is created in Bahmni, it will be auto-created in Crater. So you need to check Openmrs environment variables and ensure OpenMRS is running fine (and you can create patients in OpenMRS via Bahmni Registration screen).

About crater-atomfeed

Crater-atomfeed is the service running to connect Bahmni to crater (it is the integration bridge between the two services). So to run crater we need crater-atomfeed also running.

Check crater atomfeed configration (in .env file):

  1. In .env file, go to

crater-atomfeed validate the openmrs and crater configurations.

  1. Validate the database configuration of

crater-atomfeed-db service.

About Crater

Crater configration can be checked under crater-nginx section, mentioned port is localhost:81 (by default).

Currently we are using MySQL database for crater which we can checked in docker-compose file->craterdb section currently running port of database can also be checked there, to change or add any configuration change credentials under craterdb section of docker-compose file. To validate the creds like username and password go into .env file of bahmni-docker.

Once you understood why we need crater-atomfeed and openmrs with crater you can start setting up crater.

Running Crater using Docker

Now run the profile of crater using the command (note: you can also run profile bahmni-lite, which brings all services up: OpenMRS and Crater in one shot).

docker-compose --profile crater up -d

To run crater and bahmni altogether you will also need to run openmrs and crater atomfeed use the command

docker-compose --profile crater-atomfeed --profile openmrs up -d

If all (crater,crater-atomfeed and openmrs ) are up then your console will show :-

To Check the logs follow the steps:-

  • docker ps | grep <name of the container whose logs you want to check>

    Through the above command you will get the container ID of the container whose logs you want to check and will also show whether the container is up or not

  • docker logs -f <CONTAINER ID>

Crater Up and Running: If the docker container are up and running fine, open your browser on https://localhost:81 . That’s it!

Making Code Changes to Crater Atomfeed

If during development you want to make any change in the backend code of crater-atomfeed then maven build the backend code a jar will be created paste it in Dockerfile in package->docker->Dockerfile now build the docker project using the command

docker build -t bahmni/crater-atomfeed:test -f package/docker/Dockerfile .

An image with name crater-atomfeed:test will be created now change the image in crater-atomfeed to bahmni/crater-atomfeed:test
and run the command

docker-compose --profile openmrs --profile crater --profile crater-atomfeed up -d

Running Bahmni on Docker

  • No labels