A Docker distribution for a custom microfrontend for OpenMRS HIV Reference Implementation (OHRI)
What to install -
Prerequisites to have an environment:
To run OHRI using Docker in your computer, you need:
To develop OHRI using the image, please install.
VSCode: https://code.visualstudio.com/download ORSublime Text:
-
[Install Node]https://nodejs.org/en/download/
-
Docker Image histacohri/docker-openmrs-esm-ohri
- Download and install Docker on your machine
- Clone this repo and enter the newly-created folder
git clone <repo> && cd <repo name>
The docker image can be used in two ways: static (without code modifications) or dynamic (with code modifications).
After running any of the commands below, you can access the app at localhost:8080/openmrs/spa
.
In the static mode, you will get to test the ESM without being able to make changes to its source code.
npm run docker
Note: You can also run the docker command directly, without using the npm script
docker run -p 8080:8080 -p 8081:8081 histacoohri/docker-openmrs-esm-ohri:v0.6.3 npx openmrs develop --backend https://ohri-dev.globalhealthapp.net
In the dynamic mode, the folder src
on your local machine gets mounted to the container so that changes you make locally are reflected in the container. The image has live reload enabled, so the changes are automatically applied to the container.
npm run docker:dev
Note: You can also run the docker command directly, without using the npm script
docker compose up
We're using docker compose
to simplify the process of mounting the local src
directory to the container.
After running the commands, you will see
![Building module]
After about 3mins, your build will complete and you can now access the application at localhost:8080/openmrs/spa
![Build complete]