Hi guys, I am Arun V G, a software engineer. I tried the Bahmni Online Demo for Bahmni Standard and it works well.
I am trying to install the Bahmni software in my local and set up the application but I am not able to do it.
I referred the Bahmni’s official wiki documentation and Bahmni Github repos as a guide to install Bahmni in my local in several ways.
First, I tried the recommended approach of using Docker Compose to get Bahmni Standard, Bahmni Lite and Bahmni EMR running.
The Bahmni Standard consumes 500% CPU usage in the Docker metrics and since it’s too large, the response time is very slow and the application also doesn’t load at all in localhost - configured respective port.
The Bahmni Lite, comparatively, is a lightweight package and responds decently well. It also doesn’t come that easily. The homepage for the Bahmni Lite application is configured to be HTTP by default but the site expects a HTTPS format. When I manually change the URL to HTTPS, after a “This site is not secure” warning pops up and I give “Proceed to site” in advanced settings, the homepage of Bahmni Application loads with three potential functionalities.
In Patient Registration module, the page loads and I enter the login credentials but the location dropdown doesn’t show any values to select and it is configured as a mandatory field to fill in the input validation, so I can’t proceed with that.
In analytics module, the page loaded after I changed the COMPOSE-PROFILES=bahmni-metabase and bahmni-mart but it showed the site is in maintenance.
And the other functionality URL is wrong or invalid, so that doesn’t load too.
Didn’t mean to sound rude but just trying to run a full-fledged working application so that I can understand its structure and try to contribute to it more, guys!
And the Bahmni EMR is the same as Bahmni Lite, when I configured it, I again observed the Bahmni Lite small clinical features.
There was another approach to try Bahmni Application in Digital Ocean or something from cloud, since I only want to run it in my local, that method isn’t suitable for me.
So, the other approach I took was running the application in local manually by cloning the necessary git repos and installing the required dependencies.
Openmrs-module-bahmniapps is the major frontend code repo and bahmni-core is the major backend module repo but the backend has several other dependencies such as bacteriology, rules-engine etc. There were about 11 sub-dependency repos for the bahmni-core backend module repo.
I followed the git repo description guide and built .OMOD files from bahmni-core repo and built frontend with yarn install, yarn build and yarn ci within the respective folders mentioned. First, it was micro-frontend folder and then ui sub folder. I am using Windows and seems like the frontend involves Ruby and Compass configuration for proper CSS and SCSS styling frameworks. I installed Ruby latest version in my lap through official Ruby Installation Manager site and when I checked it in the command prompt (cmd) with commands like ruby --help, ruby --version or even when executing the frontend module with the yarn ci command, the only output the terminal showed was “Access is Denied”.
In the git repo, it is instructed to download ruby through rvm (Ruby Version Manager) but the rvm doesn’t directly support windows but only Linux, MacOS and WSL (Windows Subsystem for Linux).
Since ruby installation in windows directly isn’t supported, now I am following the running the application locally with git cloning repos approach only with only the modification of using a Docker Network for the Ruby and Compass part since those can be utilized in images and not direct installation in windows. Tried this approach. Created a Dockerfile with instructions to install node js, grunt-cli, ruby and compass in the root directory of the frontend repo. And then I built a image locally with this Dockerfile and then created a container from this image I just locally built and started a shell within the container with docker run -it command and mounted the volume of this whole frontend directory to the /app path of the container so that the container gets the context of the whole repo/directory. And now, I am trying to run the yarn install, build and ci commands within the respective subfolders within the shell environment within the created container.
The yarn install command within the micro-frontend subfolder succeeded but took 73 minutes and 1 lakh packages downloading to complete it. And then I tried the yarn build command which failed. Must be storage issues within the container. I don’t know how to proceed anymore. So, I request help from any Bahmni Contributors, since you would know Bahmni better than anyone!!!
And also, in a series of events, I installed OpenMRS Standalone Platform 2.5.0 and started the tomcat server which is configured by default of course. A Login Page appeared for OpenMRS as a result of this OpenMRS platform running. I logged in with the credentials: admin/test and it got logged in. I saw something called Add-On Manager, which I believe is used to upload .OMOD files from the backend repo sub-folders manually to OpenMRS so that it integrates the backend and runs it in a separate port. In Bahmni-Core backend repo, I uploaded 3 .OMOD files to the Add-On Manager and it said I have to install its dependencies first which were that 11 other repos I mentioned earlier!!! Also, for backend repo build, in Bahmni-Core, it was mentioned as ./mvnw clean install using Maven Wrapper Build of backend modules but for all the other dependency repos that the OpenMRS Standalone Platform 2.5.0 Logs showed, there isn’t a proper guide or documentation on how to build OMOD files from those.
On the other hand, when I ran yarn ci in frontend repo module, a single unit test failed out of many due to some UTC timezone issue, so since it is only testing and it doesn’t affect the already-generated build file “dist” from yarn build command earlier, I deployed the frontend app in the root directory simply to a static node js server with the command “npx serve” and it immediately started listening healthy on port 3000, which I navigated to, to try out and see the output. Seems like an index.html file without Ruby or Compass (can’t install) got deployed, well, it was actually a basic frontend website without any styling.
So, the frontend app and the backend app are running in totally different and separate ports. The concept is that, if the REST API endpoints are correctly configured in the frontend module repo, then it can be able to call the backend, so the frontend repo deployed port will act as a Bahmni Application integrated all together.
But currently, as I said, the latest issues I face in the Frontend is the Container Storage issue (The Dockerfile approach) and in the Backend is the 11 more dependencies OMOD files to be uploaded in the OpenMRS platform before uploading bahmni-core repo OMOD file and not proper guide to approach it also.
Also, the Youtube Tutorial to install the Bahmni Standard was also done in MacOS so when I tried the same steps in my windows machine, it didn’t work.
Been working on this Docker Compose for a week and locally installing all the dependencies with git repos cloning for about three days now.
So, I really appreciate your help on this issue, if anyone could help me approach this easily. Kindly reply with a potential solution addressing this issue so that I can be able to run the Bahmni Application Locally in my Windows Laptop.
Official Links I used: