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 3 Next »

This setup includes setting up crater into your own PC using docker

Prerequisites:-

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

About Openmrs :-

As Openmrs is the main service on which Bahmni is built if any patient is created in Bahmni it will be created in Openmrs database itself and can be seen in crater so you need may need to check Openmrs environment variables.

To check openmrs running configration in bahmni-docker :-
1.Go to openmrs
2.Check the Database configrations in it.

About crater-atomfeed :-

Crater-atomfeed is the service running to connect Bahmni to crater so to run crater we need crater-atomfeed also running, check crater atomfeed configration :-
1. In crater-atomfeed go to environment and match the openmrs and crater configrations to connect openmrs to crater
2. Database configration is present in crater-atomfeed-db
3. Check environment

About crater :-

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

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 configration change credentials under craterdb section of docker-compose file .To fetch the data 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.

Setup Crater using Docker:-

Once you have cloned the repository cd into Bahmni-docker
Now run the profile of crater using the command

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>

If the docker container are up and running fine then you crater setup will be done successfully , run crater on localhost:81(default mentioned port in bahmni-docker).

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

Success

Once you are done with the setup try running crater on the port mention in the docker compose file under crater-nginx section.

  • No labels