Skip to main content

Kubernetes

Docker Image

Our Docker image is hosted on the github container registry here. All images are tagged with semantic versioning correlating to the servers packageJSON version (also correlating with the published version on npm see).

Usage

The docker image supports three use-cases (specified via ending argument) For a list of environment variables that can be used see here

Running the Server (Main FHIR Server)

Running the FHIR Server docker run [environment-variables] ghcr.io/iguhealth/iguhealth/iguhealth server.

docker run -p 3000:3000 --env REDIS_HOST=docker.for.mac.host.internal --env REDIS_PORT=6379 --env FHIR_DATABASE_NAME=testdb --env FHIR_DATABASE_PORT=5432 --env FHIR_DATABASE_USERNAME=postgres --env FHIR_DATABASE_HOST=docker.for.mac.host.internal ghcr.io/iguhealth/iguhealth/iguhealth server

Running a Worker (Subscription processing)

Running the a subscription worker docker run [environment-variables] ghcr.io/iguhealth/iguhealth/iguhealth worker.

docker run  --env REDIS_HOST=docker.for.mac.host.internal --env REDIS_PORT=6379 --env FHIR_DATABASE_NAME=testdb --env FHIR_DATABASE_PORT=5432 --env FHIR_DATABASE_USERNAME=postgres --env FHIR_DATABASE_HOST=docker.for.mac.host.internal ghcr.io/iguhealth/iguhealth/iguhealth worker

Running SQL Migrations (Setting up database IE creating tables etc.)

Running database migrations docker run [environment-variables] ghcr.io/iguhealth/iguhealth/iguhealth migrate.

docker run --env FHIR_DATABASE_NAME=testdb --env FHIR_DATABASE_PORT=5432 --env FHIR_DATABASE_USERNAME=postgres --env FHIR_DATABASE_HOST=docker.for.mac.host.internal ghcr.io/iguhealth/iguhealth/iguhealth migrate

Configuring Kubernetes

When setting up Kubernetes, our general recommendation is to use gitops. We use Flux on our server. When setting up the server, specify routing to the container via service. If you need assistance or example configurations, feel free to reach out.

Example Configuration

apiVersion: v1
kind: Service
metadata:
name: iguhealth
spec:
type: ClusterIP
selector:
app: server
ports:
- name: http
port: 80
protocol: TCP
targetPort: 3000