Merge remote-tracking branch 'origin/master' into rel_8_7-tracking

This commit is contained in:
dotasek
2026-01-20 09:32:57 -05:00
10 changed files with 77 additions and 100 deletions

View File

@@ -17,7 +17,7 @@ env:
jobs:
build:
name: Build
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Container meta for default (distroless) image
id: docker_meta

View File

@@ -9,7 +9,7 @@ on:
jobs:
lint:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
container: quay.io/helmpack/chart-testing:v3.11.0@sha256:f2fd21d30b64411105c7eafb1862783236a219d29f2292219a09fe94ca78ad2a
steps:
- name: Install helm-docs
@@ -38,10 +38,10 @@ jobs:
run: ct lint --config .github/ct/config.yaml
test:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
matrix:
k8s-version: [1.30.8, 1.31.4, 1.32.0]
k8s-version: [1.32.0, 1.33.0, 1.34.0, 1.35.0]
needs:
- lint
steps:

View File

@@ -1,7 +1,7 @@
FROM docker.io/library/maven:3.9.9-eclipse-temurin-17 AS build-hapi
FROM docker.io/library/maven:3.9.12-eclipse-temurin-17 AS build-hapi
WORKDIR /tmp/hapi-fhir-jpaserver-starter
ARG OPENTELEMETRY_JAVA_AGENT_VERSION=2.13.1
ARG OPENTELEMETRY_JAVA_AGENT_VERSION=2.24.0
RUN curl -LSsO https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v${OPENTELEMETRY_JAVA_AGENT_VERSION}/opentelemetry-javaagent.jar
COPY pom.xml .
@@ -16,28 +16,26 @@ RUN mvn package -DskipTests spring-boot:repackage -Pboot
RUN mkdir /app && cp /tmp/hapi-fhir-jpaserver-starter/target/ROOT.war /app/main.war
########### bitnami tomcat version is suitable for debugging and comes with a shell
########### Use the official Tomcat image as base image for the Tomcat variant
########### it can be built using eg. `docker build --target tomcat .`
FROM docker.io/bitnamilegacy/tomcat:10.1.43-debian-12-r0 AS tomcat
FROM docker.io/library/tomcat:10-jre21-temurin-noble AS tomcat
USER root
RUN rm -rf /opt/bitnami/tomcat/webapps/ROOT && \
mkdir -p /opt/bitnami/hapi/data/hapi/lucenefiles && \
chown -R 1001:1001 /opt/bitnami/hapi/data/hapi/lucenefiles && \
chmod 775 /opt/bitnami/hapi/data/hapi/lucenefiles
RUN rm -rf /usr/local/tomcat/webapps/ROOT && \
mkdir -p /usr/local/tomcat/data/hapi/lucenefiles && \
chown -R 65532:65532 /usr/local/tomcat/data/hapi/lucenefiles && \
chmod 775 /usr/local/tomcat/data/hapi/lucenefiles
RUN mkdir -p /target && chown -R 1001:1001 target
USER 1001
RUN mkdir -p /target && chown -R 65532:65532 /target
USER 65532
COPY --chown=1001:1001 catalina.properties /opt/bitnami/tomcat/conf/catalina.properties
COPY --chown=1001:1001 server.xml /opt/bitnami/tomcat/conf/server.xml
COPY --from=build-hapi --chown=1001:1001 /tmp/hapi-fhir-jpaserver-starter/target/ROOT.war /opt/bitnami/tomcat/webapps/ROOT.war
COPY --from=build-hapi --chown=1001:1001 /tmp/hapi-fhir-jpaserver-starter/opentelemetry-javaagent.jar /app
ENV ALLOW_EMPTY_PASSWORD=yes
COPY --chown=65532:65532 catalina.properties /usr/local/tomcat/conf/catalina.properties
COPY --chown=65532:65532 server.xml /usr/local/tomcat/conf/server.xml
COPY --from=build-hapi --chown=65532:65532 /tmp/hapi-fhir-jpaserver-starter/target/ROOT.war /usr/local/tomcat/webapps/ROOT.war
COPY --from=build-hapi --chown=65532:65532 /tmp/hapi-fhir-jpaserver-starter/opentelemetry-javaagent.jar /app
########### distroless brings focus on security and runs on plain spring boot - this is the default image
FROM gcr.io/distroless/java17-debian12:nonroot AS default
FROM gcr.io/distroless/java21-debian13:nonroot AS default
# 65532 is the nonroot user's uid
# used here instead of the name to allow Kubernetes to easily detect that the container
# is running as a non-root (uid != 0) user.

View File

@@ -13,8 +13,8 @@ dependencies:
- name: common
repository: oci://registry-1.docker.io/bitnamicharts
version: 2.31.3
appVersion: 8.2.0
version: 0.21.0
appVersion: 8.6.0
version: 0.22.0
annotations:
artifacthub.io/license: Apache-2.0
artifacthub.io/containsSecurityUpdates: "false"

View File

@@ -1,6 +1,6 @@
# HAPI FHIR JPA Server Starter Helm Chart
![Version: 0.21.0](https://img.shields.io/badge/Version-0.21.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 8.2.0](https://img.shields.io/badge/AppVersion-8.2.0-informational?style=flat-square)
![Version: 0.22.0](https://img.shields.io/badge/Version-0.22.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 8.6.0](https://img.shields.io/badge/AppVersion-8.6.0-informational?style=flat-square)
This helm chart will help you install the HAPI FHIR JPA Server in a Kubernetes environment.
@@ -39,7 +39,7 @@ helm install hapi-fhir-jpaserver hapifhir/hapi-fhir-jpaserver
| image.pullPolicy | string | `"IfNotPresent"` | image pullPolicy to use |
| image.registry | string | `"docker.io"` | registry where the HAPI FHIR server image is hosted |
| image.repository | string | `"hapiproject/hapi"` | the path inside the repository |
| image.tag | string | `"v8.2.0-1@sha256:e85ded02f60e25a66e6d9423ea71f3ebc9494e3a69bdd7d7dbfa31b8aa5b2fe9"` | the image tag. As of v5.7.0, this is the `distroless` flavor by default, add `-tomcat` to use the Tomcat-based image. |
| image.tag | string | `"v8.6.0-1@sha256:7611e4d6601f35dd8c223ed2ed47a2807be06976f71b2e5990e6541bbc90c16f"` | the image tag. As of v5.7.0, this is the `distroless` flavor by default, add `-tomcat` to use the Tomcat-based image. |
| imagePullSecrets | list | `[]` | image pull secrets to use when pulling the image |
| ingress.annotations | object | `{}` | provide any additional annotations which may be required. Evaluated as a template. |
| ingress.enabled | bool | `false` | whether to create an Ingress to expose the FHIR server HTTP endpoint |

View File

@@ -7,7 +7,7 @@ image:
# -- the path inside the repository
repository: hapiproject/hapi
# -- the image tag. As of v5.7.0, this is the `distroless` flavor by default, add `-tomcat` to use the Tomcat-based image.
tag: "v8.2.0-1@sha256:e85ded02f60e25a66e6d9423ea71f3ebc9494e3a69bdd7d7dbfa31b8aa5b2fe9"
tag: "v8.6.0-1@sha256:7611e4d6601f35dd8c223ed2ed47a2807be06976f71b2e5990e6541bbc90c16f"
# -- image pullPolicy to use
pullPolicy: IfNotPresent

View File

@@ -1 +1 @@
docker build --tag hapiproject/hapi:latest --tag hapiproject/hapi:4.1 -m 4g .
docker build --tag hapiproject/hapi:latest --tag hapiproject/hapi:8.6.1 -m 4g .

View File

@@ -1,4 +1,3 @@
version: "3"
services:
hapi-fhir-jpaserver-start:
build: .
@@ -8,18 +7,29 @@ services:
SPRING_DATASOURCE_URL: "jdbc:postgresql://hapi-fhir-postgres:5432/hapi"
SPRING_DATASOURCE_USERNAME: "admin"
SPRING_DATASOURCE_PASSWORD: "admin"
SPRING_DATASOURCE_DRIVERCLASSNAME: "org.postgresql.Driver"
SPRING_DATASOURCE_DRIVER_CLASS_NAME: "org.postgresql.Driver"
SPRING_JPA_PROPERTIES_HIBERNATE_DIALECT: ca.uhn.fhir.jpa.model.dialect.HapiFhirPostgresDialect
ports:
- "8080:8080"
depends_on:
hapi-fhir-postgres:
condition: service_healthy
hapi-fhir-postgres:
image: postgres:15-alpine
image: postgres:16-alpine
container_name: hapi-fhir-postgres
restart: always
environment:
POSTGRES_DB: "hapi"
POSTGRES_USER: "admin"
POSTGRES_PASSWORD: "admin"
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready -U admin -d hapi' || exit 1"]
interval: 10s
timeout: 5s
start_period: 5s
retries: 5
volumes:
- hapi-fhir-postgres:/var/lib/postgresql/data
volumes:
hapi-fhir-postgres:

99
pom.xml
View File

@@ -7,6 +7,20 @@
<java.version>17</java.version>
<hapi.fhir.jpa.server.starter.revision>1</hapi.fhir.jpa.server.starter.revision>
<clinical-reasoning.version>4.0.0</clinical-reasoning.version>
<!-- Plugins Versions -->
<maven.failsafe.version>3.5.4</maven.failsafe.version>
<maven.fire.version>${maven.failsafe.version}</maven.fire.version>
<maven.dependency.version>3.9.0</maven.dependency.version>
<maven.compiler.version>3.14.1</maven.compiler.version>
<!-- Dependencies Versions -->
<spring.ai.version>1.1.2</spring.ai.version>
<awaitility.version>4.3.0</awaitility.version>
<micrometer.version>1.16.2</micrometer.version>
<commons.logging.version>1.3.5</commons.logging.version>
<spring_boot_version>3.5.9</spring_boot_version>
<postgresql.version>42.7.9</postgresql.version>
</properties>
<!-- one-liner to take you to the cloud with settings form the application.yaml file: -->
@@ -73,6 +87,7 @@
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
@@ -222,7 +237,7 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
<version>${commons.logging.version}</version>
<scope>provided</scope>
</dependency>
@@ -344,7 +359,7 @@
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<version>4.2.0</version>
<version>${awaitility.version}</version>
<scope>test</scope>
</dependency>
@@ -364,41 +379,41 @@
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-core</artifactId>
<version>1.13.3</version>
<version>${micrometer.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.micrometer/micrometer-registry-prometheus -->
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
<version>1.13.3</version>
<version>${micrometer.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.micrometer/micrometer-registry-prometheus-simpleclient -->
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus-simpleclient</artifactId>
<version>1.13.3</version>
<version>${micrometer.version}</version>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>5.0.1</version>
<version>5.1.0</version>
</dependency>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-mcp</artifactId>
<version>1.1.0-M2</version>
<version>${spring.ai.version}</version>
</dependency>
<!--implementation("org.springframework.ai:spring-ai-starter-mcp-server-webmvc:1.1.0-M1")-->
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-starter-mcp-server</artifactId>
<version>1.1.0-M2</version>
<version>${spring.ai.version}</version>
</dependency>
<dependency>
@@ -433,12 +448,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.6.0</version>
<version>${maven.dependency.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.4.0</version>
<artifactId>maven-fire-plugin</artifactId>
<version>${maven.fire.version}</version>
</plugin>
</plugins>
</pluginManagement>
@@ -474,7 +489,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<version>${maven.compiler.version}</version>
<configuration>
<release>${java.version}</release>
</configuration>
@@ -505,7 +520,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.4.0</version>
<version>${maven.failsafe.version}</version>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
</configuration>
@@ -677,62 +692,6 @@
</dependency>
</dependencies>
</profile>
<profile>
<id>ossrh-repo</id>
<activation>
<activeByDefault>false</activeByDefault>
<property>
<name>deployToSonatype</name>
</property>
</activation>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<keyname>${gpg.keyname}</keyname>
<passphraseServerId>${gpg.keyname}</passphraseServerId>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- For connecting to GCP CloudSQL Postgres instances:
https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/blob/main/docs/jdbc.md#postgres-1
Needs 'boot' profile as well. -->
@@ -742,7 +701,7 @@
<dependency>
<groupId>com.google.cloud.sql</groupId>
<artifactId>postgres-socket-factory</artifactId>
<version>1.17.0</version>
<version>1.28.0</version>
</dependency>
</dependencies>
</profile>

View File

@@ -434,3 +434,13 @@ hapi:
# R. LastN (analytics)
# -------------------------------------------------------------------------------
# lastn_enabled: true
# -------------------------------------------------------------------------------
# S. Testers (webui)
# -------------------------------------------------------------------------------
tester:
home:
name: Local Tester
server_address: 'http://localhost:8080/fhir'
refuse_to_fetch_third_party_urls: false
fhir_version: R4