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
Some prior knowledge about openmrs and crater-atomfeed.
You can find full setup of crater and crater-atomfeed with Bahmni in this given module.
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).
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):
In .env file, go to
crater-atomfeed validate the openmrs and crater configurations.
Validate the database configuration of
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