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:
@@ -8,9 +8,17 @@ services:
|
||||
SPRING_DATASOURCE_USERNAME: "admin"
|
||||
SPRING_DATASOURCE_PASSWORD: "admin"
|
||||
SPRING_DATASOURCE_DRIVER_CLASS_NAME: "org.postgresql.Driver"
|
||||
SPRING_JPA_PROPERTIES_HIBERNATE_DIALECT: ca.uhn.fhir.jpa.model.dialect.HapiFhirPostgresDialect
|
||||
HIBERNATE_DIALECT: ca.uhn.fhir.jpa.model.dialect.HapiFhirPostgresDialect
|
||||
ports:
|
||||
- "8080:8080"
|
||||
# Uncomment to enable periodic health checks.
|
||||
# Can also be run manually: docker exec hapi-fhir-jpaserver-start java -cp /app HealthCheck
|
||||
# healthcheck:
|
||||
# test: ["CMD", "java", "-cp", "/app", "HealthCheck"]
|
||||
# interval: 30s
|
||||
# timeout: 10s
|
||||
# start_period: 60s
|
||||
# retries: 3
|
||||
depends_on:
|
||||
hapi-fhir-postgres:
|
||||
condition: service_healthy
|
||||
|
||||
Reference in New Issue
Block a user