Before going any further, make sure you meet all the requirements.
Before we start the application, you need to make sure you have a postgresql database with some user created for kefhir. You may refer to this example:
docker rm -vf kefhir-postgres
docker run -d --restart=unless-stopped --name kefhir-postgres -e POSTGRES_PASSWORD=postgres -p 5151:5432 postgres:14
sleep 3
docker exec -i kefhir-postgres psql -U postgres <<-EOSQL
CREATE ROLE kefhir_admin LOGIN PASSWORD 'test' NOSUPERUSER INHERIT NOCREATEDB CREATEROLE NOREPLICATION;
CREATE ROLE kefhir_app LOGIN PASSWORD 'test' NOSUPERUSER INHERIT NOCREATEDB CREATEROLE NOREPLICATION;
CREATE DATABASE kefhirdb WITH OWNER = kefhir_admin ENCODING = 'UTF8' TABLESPACE = pg_default CONNECTION LIMIT = -1;
grant temp on database kefhirdb to kefhir_app;
grant connect on database kefhirdb to kefhir_app;
EOSQL
Select your installation type:
Micronaut packs application as a runnable jar, which means that it can be easily packaged within a Docker container.
Upgrading is simply a matter of recreating the container with the latest image version:
docker rm -vf kefhir
docker pull docker.kodality.com/kefhir-demo
docker run -d --name=kefhir \
-eDB_URL='jdbc:postgresql://172.17.0.1:5151/kefhirdb' \
-eDB_POOL_SIZE='10' \
-eJAVA_OPTS=-Xmx1800m \
-p 8181:8181 \
docker.kodality.com/kefhir-demo
The list of the possible options of Docker container includes:
http://www.hl7.org/fhir/definitions.json.zip
Please refer to Storage for more details on these
The following commands will pull the latest image and recreate the containers defined in the docker-compose file:
version: '3.3'
services:
kefhir-demo:
container_name: kefhir
environment:
- 'DB_URL=jdbc:postgresql://172.17.0.1:5151/kefhirdb'
- DB_POOL_SIZE=10
- JAVA_OPTS=-Xmx1800m
ports:
- '8181:8181'
image: docker.kodality.com/kefhir-demo
docker-compose up --force-recreate
KeFHIR can be installed using Kefhir Helm chart
For minimal configuration setup datasource parameters helm-valuess.yml:
postgres:
url: jdbc:postgresql://postgres.default:5432/somedb
admin:
user: kefhir_admin
password: test
app:
user: kefhir_app
password: test
helm repo add kodality https://kexus.kodality.com/helm
helm install my-kefhir-release kodality/kefhir -f helm-value.yaml
PostgreSQL can be installed in Kubernetes cluster using one the following Helm charts:
Fhir resources should now be available under http://localhost:8181/fhir
, for example http://localhost:8181/fhir/Patient