This repo contains the required config to start up a Hapi FHIR server alongside the OpenHIM and a reverse proxy to be used for Rwanda Platform purposes.
- Docker
- An Active Docker Swarm
- Check that you have an active docker swarm running on the respective environment.
docker info | grep Swarm
- If no swarm is running, you can start a swarm with
docker swarm init
. - Ensure that you have the correct IG URL specified in the respective environment variable file (e.g.
.env.local
). The variable to set isFHIR_IG_URL
. - Run
./get-cli.sh
to download the latest release of the CLI. You can download only the specific CLI for your operating system by providing it as a parameter. (e.g../get-cli.sh macos
) - Run the relevant deploy script. (e.g.
./deploy-local.sh
)
There are scripts in the root folder of this repo to assist in reloading the IG in HAPI-FHIR.
NB: This process will clear the Hapi-FHIR Postgres database.
- Run
./replace-ig-local.sh
which will run the Jembi Platform twice, the first run will remove the existing Hapi-FHIR and Postgres services, while the second run will recreate the services as well as rerun the importing of the FHIR IG specified inFHIR_IG_URL
NB: Only a person that has SSH access to the server will be able to run this command.
- Run
DOCKER_HOST=ssh://[email protected] Platform.jembi.cloud ./replace-ig-qa.sh
which will run the Jembi Platform twice, the first run will remove the existing Hapi-FHIR and Postgres services, while the second run will recreate the services as well as rerun the importing of the FHIR IG specified inFHIR_IG_URL
The ./depoy-{environment}.sh
scripts will default to using the Linux
binary and running the init
deploy action. This can be overriden by supplying parameters to the script. The first parameter being the action and the second parameter being the operating system. (e.g. ./deploy-local.sh remove macos
will run the remove command using the MacOS binary)
- The
./deploy-local.sh
and./replace-ig-local.sh
scripts will make use of Platform profiles which are specified to configure the services for local development purposes exposing the ports of these services and allowing access to the Hapi-FHIR GUI.
- The
./deploy-qa.sh
and./replace-ig-qa.sh
scripts will make use of Platform profiles which are specified to configure the services for QA purposes, securing the services and disallowing access to the Hapi-FHIR GUI.
To deploy a specific version of FHIR, use the environment variable FHIR_VERSION. Default value is R4