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:
@@ -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 .`
|
||||
|
||||
Reference in New Issue
Block a user