Crater developer changes :-

The below article is for developers who want to do changes in crater PHP code :-

Prerequisites:-

  • PHP

  • Yarn

  • Docker

At the end of this module you will be able to made changes to crater code.

Steps to be followed :-

After you did the desired changes to the code you would wish the changes to be reflected for the same you need to build the project using yarn build so follow the below commands:-

yarn composer install yarn build

After the above steps you cant composer up the project because these changes are made only in your local not into the docker to do the same follow the steps given below:-

docker build -t bahmni/crater-php -f docker/Dockerfile . docker build -t bahmni/crater-nginx -f docker/nginx.Dockerfile .

We would need to edit .env file to let the server run on localhost:-

Simple change crater.test to localhost everywhere in .env file or :-

Change the CRATER_APP_URL value to http://localhost

CRATER_SANCTUM_STATEFUL_DOMAINS value to localhost

CRATER_SESSION_DOMAIN value to localhost

Now once both of your images are built you can run your docker container

cd docker docker compose up -d

 

Navigate to localhost in your browser and check your application will be up and running with the changes being reflected .

Success

You have successfully made changes to the crater application .

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