To easily get started with implementing the OpenHIM Core and Console and to start playing with the various features we can follow the below steps to get a local OpenHIM environment setup.
Don't have time to setup? Try our sandbox environments! See the links in the footer.
The below method of spinning up the OpenHIM makes use of Docker containers that allows for easier deployments of the OpenHIM.
We will need to install some software that will allow us to spin up the OpenHIM with ease. We will be using Docker which is a container management service to create our OpenHIM instance.
Docker is the engine that will be running our entire local OpenHIM instance by using the publicly available OpenHIM core and console images. To install Docker please follow the relevant steps based on the operating system you are using as described in the below link
To install Docker please follow the relevant steps as described within the install documentation
Install Docker Compose
Now that we have Docker installed on our machine, we will also need to install Docker Compose which is an additional service that makes use of our below
docker-compose.yml file and builds the relevant containers for us to have our OpenHIM instance up and running. The OpenHIM can be setup and configured without these steps however manually creating the relevant Docker containers requires more advanced knowledge of Docker.
To install Docker Compose please follow the relevant steps as described within the install documentation.
Docker Compose file
Before we can use Docker to build our OpenHIM instance, we need to create a
docker-compose.yml that will contain our instructions for pulling the correct OpenHIM Core and Console images from Jembi's Dockerhub profile
docker-compose.yml can be downloaded from the OpenHIM core repository, or you can copy/paste the below yaml code into a file named
version: '3'networks:openhim:services:mongo-db:container_name: mongo-dbimage: mongo:4.0networks:- openhimvolumes:- "mongo-data:/data/db"restart: unless-stoppedopenhim-core:container_name: openhim-coreimage: jembi/openhim-core:latestrestart: unless-stoppedenvironment:mongo_url: "mongodb://mongo-db/openhim-development"mongo_atnaUrl: "mongodb://mongo-db/openhim-development"NODE_ENV: "development"ports:- "8080:8080"- "5000:5000"- "5001:5001"networks:- openhimhealthcheck:test: "curl -sSk https://openhim-core:8080/heartbeat || exit 1"interval: 30stimeout: 30sretries: 3openhim-console:container_name: openhim-consoleimage: jembi/openhim-console:latestrestart: unless-stoppednetworks:- openhimports:- "9000:80"healthcheck:test: "curl -sS http://openhim-console || exit 1"interval: 30stimeout: 30sretries: 3volumes:mongo-data: