Standalone Java health check

- Updated Dockerfile to compile HealthCheck.java into the distroless image at /app
- Updated README with a "Docker Health Check" section documenting how to run the health check on-demand and how to enable periodic checks
- Also fixed Hibernate dialect override (SPRING_JPA_PROPERTIES_HIBERNATE_DIALECT → HIBERNATE_DIALECT) to resolve DDL failures when starting with a fresh PostgreSQL database.
This commit is contained in:
c-schuler
2026-02-19 12:23:18 -07:00
parent 53837d6c94
commit 8f3335e8bb
5 changed files with 73 additions and 2 deletions

View File

@@ -15,6 +15,9 @@ FROM build-hapi AS build-distroless
RUN mvn package -DskipTests spring-boot:repackage -Pboot
RUN mkdir /app && cp /tmp/hapi-fhir-jpaserver-starter/target/ROOT.war /app/main.war
COPY src/main/java/HealthCheck.java /app/HealthCheck.java
RUN javac /app/HealthCheck.java
########### Use the official Tomcat image as base image for the Tomcat variant
########### it can be built using eg. `docker build --target tomcat .`