Install
Choose the way that suits where you will run it. They all start the same server.
A multi-architecture image (amd64 and arm64) is published for every release.
docker run --rm -p 8080:8080 -v refhir-data:/data ghcr.io/hai-hq/refhir:0.0.1The tags are 0.0.1, 0.0 and latest. Pin a version in anything you keep.
The image’s default configuration listens on 0.0.0.0:8080, keeps a SQLite database at
/data/refhir.sqlite and caches packages in /data/package-cache, so mount a volume at /data
or the data goes when the container does. To use your own settings, mount a file at
/etc/refhir/refhir.toml; it replaces the default.
Archives are published for Linux on amd64 and arm64, and for macOS on Apple silicon. Each
holds one folder with the refhir binary, LICENSE, NOTICE, README.md and CHANGELOG.md.
VERSION=0.0.1PLATFORM=linux-amd64 # or linux-arm64, or macos-arm64BASE=https://github.com/hai-hq/refhir/releases/download/v$VERSION
curl -LO $BASE/refhir-$VERSION-$PLATFORM.tar.gzcurl -LO $BASE/SHA256SUMSgrep "refhir-$VERSION-$PLATFORM" SHA256SUMS | shasum -a 256 -c
tar -xzf refhir-$VERSION-$PLATFORM.tar.gz./refhir-$VERSION-$PLATFORM/refhir --versionThere are no Windows or Intel macOS binaries; build those from source. Start a throwaway
server with ./refhir-$VERSION-$PLATFORM/refhir --memory.
You need Rust 1.88. In a clone, rustup installs it from rust-toolchain.toml.
git clone https://github.com/hai-hq/refhir.gitcd refhircargo run -p refhir -- --memoryTo install the binary instead of running it from the clone:
cargo install --git https://github.com/hai-hq/refhir.git refhirrefhir --memoryThe crate is not on crates.io, so install it from GitHub.
The Helm chart is in the repository.
git clone https://github.com/hai-hq/refhir.githelm install refhir ./refhir/deploy/helm/refhir \ --set image.repository=ghcr.io/hai-hq/refhir \ --set image.tag=latestA single pod uses SQLite. To run several processes, use Postgres and cluster.enabled=true.
See the Helm chart and Several processes.
Check that it works
Section titled “Check that it works”While the server installs packages and builds its search indexes it answers 503 with
"status":"starting". When it is ready, /readyz returns 200:
curl -s http://127.0.0.1:8080/readyz# {"status":"ok"}
curl -s http://127.0.0.1:8080/metadata | head -c 300/metadata is the CapabilityStatement, built from what is installed, so it is the authority on
what this server supports. Without --bind, the server listens on 127.0.0.1:8080.
Where the data lives
Section titled “Where the data lives”| How you started it | Where the data goes |
|---|---|
--memory |
In RAM. It is gone when the process exits. Good for trying things. |
--sqlite path |
A SQLite file. Without a path the default is refhir.sqlite in the working directory. |
--postgres url |
Postgres, for production and for several processes on one database. |
- Getting started covers configuration, the Docker details and demo data.
- Tutorial: a live patient list builds something that updates as the data changes.
- Production deployment is what to decide before you run it for real.