Class DockerBootstrap
java.lang.Object
org.fhirfrog.frog.server.bootstrap.DockerBootstrap
Performs a one-time HAPI FHIR bootstrap and captures the loaded server state as a
committed Docker image plus a
pg_dump SQL file.
This class encapsulates the Docker lifecycle orchestration without any build-tool
dependency (Ant, Maven, etc.). Status messages are emitted via a logger.
The bootstrap sequence:
- Checks whether
imageTagexists locally andpgDumpFileexists on disk — exits early if both present - Runs
docker compose --profile bootstrap up -d - Polls liveness/readiness via HTTP until HAPI is ready
- Stops HAPI cleanly, dumps postgres via
pg_dump, stops postgres - Commits the HAPI container as
imageTag - Tears down bootstrap containers in a
finallyblock
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordConfiguration for a bootstrap run. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(DockerBootstrap.Config config) Executes the bootstrap sequence.
-
Constructor Details
-
DockerBootstrap
-
-
Method Details
-
execute
Executes the bootstrap sequence.- Parameters:
config- bootstrap configuration- Throws:
BootstrapException- if any step fails
-