Operate the lab
Start, stop, logs and upgrades
The everyday commands for running each stack, and how to upgrade safely.
Everyday commands#
Run these from the stack's folder, for example cd ~/fhir-lab/hapi:
docker compose ps # status
docker compose logs -f --tail 100 # follow the logs
docker compose restart hapi # restart one service
docker compose stop # stop, keep the containers
docker compose up -d # start, or apply compose.yml changes
docker compose down # remove the containers (volumes and data stay)Everything has restart: unless-stopped, so it comes back by itself after a reboot.
Health checks#
curl -s -o /dev/null -w "HAPI %{http_code}\n" http://localhost:8080/fhir/metadata
curl -sk -o /dev/null -w "Engine %{http_code}\n" https://localhost:8443/
docker logs --tail 5 tunnel-cloudflared-1 | grep -c Registered # tunnel connections
ss -ltn | grep -E ':66[6-7][0-9]' # MLLP ports with a deployed channelHAPI takes about 40 seconds to start. Until then, /metadata returns an error.
Upgrades#
All images are pinned to exact versions, so nothing changes until you decide to upgrade.
Read the release notes#
HAPI: github.com/hapifhir/hapi-fhir-jpaserver-starter releases. Engine: github.com/OpenIntegrationEngine/engine releases. Look for database migration notes.
Back up first#
See Backups. Export the engine's config (Settings → Backup Config) before every engine upgrade.
Change the tag and pull#
cd ~/fhir-lab/hapi
sed -i 's#hapiproject/hapi:v8.12.0-2#hapiproject/hapi:v8.14.0-1#' compose.yml # example tag
docker compose pull && docker compose up -d && docker compose logs -f hapiHAPI migrates its database schema automatically on startup. Watch the logs for migration errors.
Test#
Run the health checks, then your drill scripts.