Skip to content

Commit a3d6fdb

Browse files
authored
Updated Libraries, fixed Docker Compose (#908)
* Updated SpringBoot, HAPI FHIR, Docker * Fixed docker compose * Fixed Chart README * Replaced Tomcat image * Replaced Tomcat image * Fixing Tomcat image * Corrected Helm Chart value
1 parent 547d618 commit a3d6fdb

File tree

9 files changed

+68
-101
lines changed

9 files changed

+68
-101
lines changed

.github/workflows/build-images.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ env:
1717
jobs:
1818
build:
1919
name: Build
20-
runs-on: ubuntu-22.04
20+
runs-on: ubuntu-24.04
2121
steps:
2222
- name: Container meta for default (distroless) image
2323
id: docker_meta

.github/workflows/chart-test.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
lint:
12-
runs-on: ubuntu-22.04
12+
runs-on: ubuntu-24.04
1313
container: quay.io/helmpack/chart-testing:v3.11.0@sha256:f2fd21d30b64411105c7eafb1862783236a219d29f2292219a09fe94ca78ad2a
1414
steps:
1515
- name: Install helm-docs
@@ -38,10 +38,10 @@ jobs:
3838
run: ct lint --config .github/ct/config.yaml
3939

4040
test:
41-
runs-on: ubuntu-22.04
41+
runs-on: ubuntu-24.04
4242
strategy:
4343
matrix:
44-
k8s-version: [1.30.8, 1.31.4, 1.32.0]
44+
k8s-version: [1.32.0, 1.33.0, 1.34.0, 1.35.0]
4545
needs:
4646
- lint
4747
steps:

Dockerfile

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
FROM docker.io/library/maven:3.9.9-eclipse-temurin-17 AS build-hapi
1+
FROM docker.io/library/maven:3.9.12-eclipse-temurin-17 AS build-hapi
22
WORKDIR /tmp/hapi-fhir-jpaserver-starter
33

4-
ARG OPENTELEMETRY_JAVA_AGENT_VERSION=2.13.1
4+
ARG OPENTELEMETRY_JAVA_AGENT_VERSION=2.24.0
55
RUN curl -LSsO https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v${OPENTELEMETRY_JAVA_AGENT_VERSION}/opentelemetry-javaagent.jar
66

77
COPY pom.xml .
@@ -16,28 +16,26 @@ RUN mvn package -DskipTests spring-boot:repackage -Pboot
1616
RUN mkdir /app && cp /tmp/hapi-fhir-jpaserver-starter/target/ROOT.war /app/main.war
1717

1818

19-
########### bitnami tomcat version is suitable for debugging and comes with a shell
19+
########### Use the official Tomcat image as base image for the Tomcat variant
2020
########### it can be built using eg. `docker build --target tomcat .`
21-
FROM docker.io/bitnamilegacy/tomcat:10.1.43-debian-12-r0 AS tomcat
21+
FROM docker.io/library/tomcat:10-jre21-temurin-noble AS tomcat
2222

2323
USER root
24-
RUN rm -rf /opt/bitnami/tomcat/webapps/ROOT && \
25-
mkdir -p /opt/bitnami/hapi/data/hapi/lucenefiles && \
26-
chown -R 1001:1001 /opt/bitnami/hapi/data/hapi/lucenefiles && \
27-
chmod 775 /opt/bitnami/hapi/data/hapi/lucenefiles
24+
RUN rm -rf /usr/local/tomcat/webapps/ROOT && \
25+
mkdir -p /usr/local/tomcat/data/hapi/lucenefiles && \
26+
chown -R 65532:65532 /usr/local/tomcat/data/hapi/lucenefiles && \
27+
chmod 775 /usr/local/tomcat/data/hapi/lucenefiles
2828

29-
RUN mkdir -p /target && chown -R 1001:1001 target
30-
USER 1001
29+
RUN mkdir -p /target && chown -R 65532:65532 /target
30+
USER 65532
3131

32-
COPY --chown=1001:1001 catalina.properties /opt/bitnami/tomcat/conf/catalina.properties
33-
COPY --chown=1001:1001 server.xml /opt/bitnami/tomcat/conf/server.xml
34-
COPY --from=build-hapi --chown=1001:1001 /tmp/hapi-fhir-jpaserver-starter/target/ROOT.war /opt/bitnami/tomcat/webapps/ROOT.war
35-
COPY --from=build-hapi --chown=1001:1001 /tmp/hapi-fhir-jpaserver-starter/opentelemetry-javaagent.jar /app
36-
37-
ENV ALLOW_EMPTY_PASSWORD=yes
32+
COPY --chown=65532:65532 catalina.properties /usr/local/tomcat/conf/catalina.properties
33+
COPY --chown=65532:65532 server.xml /usr/local/tomcat/conf/server.xml
34+
COPY --from=build-hapi --chown=65532:65532 /tmp/hapi-fhir-jpaserver-starter/target/ROOT.war /usr/local/tomcat/webapps/ROOT.war
35+
COPY --from=build-hapi --chown=65532:65532 /tmp/hapi-fhir-jpaserver-starter/opentelemetry-javaagent.jar /app
3836

3937
########### distroless brings focus on security and runs on plain spring boot - this is the default image
40-
FROM gcr.io/distroless/java17-debian12:nonroot AS default
38+
FROM gcr.io/distroless/java21-debian13:nonroot AS default
4139
# 65532 is the nonroot user's uid
4240
# used here instead of the name to allow Kubernetes to easily detect that the container
4341
# is running as a non-root (uid != 0) user.

charts/hapi-fhir-jpaserver/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ dependencies:
1313
- name: common
1414
repository: oci://registry-1.docker.io/bitnamicharts
1515
version: 2.31.3
16-
appVersion: 8.2.0
17-
version: 0.21.0
16+
appVersion: 8.6.0
17+
version: 0.22.0
1818
annotations:
1919
artifacthub.io/license: Apache-2.0
2020
artifacthub.io/containsSecurityUpdates: "false"

charts/hapi-fhir-jpaserver/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# HAPI FHIR JPA Server Starter Helm Chart
22

3-
![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)
3+
![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)
44

55
This helm chart will help you install the HAPI FHIR JPA Server in a Kubernetes environment.
66

@@ -39,7 +39,7 @@ helm install hapi-fhir-jpaserver hapifhir/hapi-fhir-jpaserver
3939
| image.pullPolicy | string | `"IfNotPresent"` | image pullPolicy to use |
4040
| image.registry | string | `"docker.io"` | registry where the HAPI FHIR server image is hosted |
4141
| image.repository | string | `"hapiproject/hapi"` | the path inside the repository |
42-
| 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. |
42+
| 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. |
4343
| imagePullSecrets | list | `[]` | image pull secrets to use when pulling the image |
4444
| ingress.annotations | object | `{}` | provide any additional annotations which may be required. Evaluated as a template. |
4545
| ingress.enabled | bool | `false` | whether to create an Ingress to expose the FHIR server HTTP endpoint |

charts/hapi-fhir-jpaserver/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ image:
77
# -- the path inside the repository
88
repository: hapiproject/hapi
99
# -- the image tag. As of v5.7.0, this is the `distroless` flavor by default, add `-tomcat` to use the Tomcat-based image.
10-
tag: "v8.2.0-1@sha256:e85ded02f60e25a66e6d9423ea71f3ebc9494e3a69bdd7d7dbfa31b8aa5b2fe9"
10+
tag: "v8.6.0-1@sha256:7611e4d6601f35dd8c223ed2ed47a2807be06976f71b2e5990e6541bbc90c16f"
1111
# -- image pullPolicy to use
1212
pullPolicy: IfNotPresent
1313

docker-build.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
docker build --tag hapiproject/hapi:latest --tag hapiproject/hapi:4.1 -m 4g .
1+
docker build --tag hapiproject/hapi:latest --tag hapiproject/hapi:8.6.1 -m 4g .

docker-compose.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: "3"
21
services:
32
hapi-fhir-jpaserver-start:
43
build: .
@@ -8,18 +7,29 @@ services:
87
SPRING_DATASOURCE_URL: "jdbc:postgresql://hapi-fhir-postgres:5432/hapi"
98
SPRING_DATASOURCE_USERNAME: "admin"
109
SPRING_DATASOURCE_PASSWORD: "admin"
11-
SPRING_DATASOURCE_DRIVERCLASSNAME: "org.postgresql.Driver"
10+
SPRING_DATASOURCE_DRIVER_CLASS_NAME: "org.postgresql.Driver"
11+
SPRING_JPA_PROPERTIES_HIBERNATE_DIALECT: ca.uhn.fhir.jpa.model.dialect.HapiFhirPostgresDialect
1212
ports:
1313
- "8080:8080"
14+
depends_on:
15+
hapi-fhir-postgres:
16+
condition: service_healthy
1417
hapi-fhir-postgres:
15-
image: postgres:15-alpine
18+
image: postgres:16-alpine
1619
container_name: hapi-fhir-postgres
1720
restart: always
1821
environment:
1922
POSTGRES_DB: "hapi"
2023
POSTGRES_USER: "admin"
2124
POSTGRES_PASSWORD: "admin"
25+
healthcheck:
26+
test: ["CMD-SHELL", "sh -c 'pg_isready -U admin -d hapi' || exit 1"]
27+
interval: 10s
28+
timeout: 5s
29+
start_period: 5s
30+
retries: 5
2231
volumes:
2332
- hapi-fhir-postgres:/var/lib/postgresql/data
33+
2434
volumes:
2535
hapi-fhir-postgres:

pom.xml

Lines changed: 30 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,20 @@
77
<java.version>17</java.version>
88
<hapi.fhir.jpa.server.starter.revision>1</hapi.fhir.jpa.server.starter.revision>
99
<clinical-reasoning.version>4.0.0</clinical-reasoning.version>
10+
11+
<!-- Plugins Versions -->
12+
<maven.failsafe.version>3.5.4</maven.failsafe.version>
13+
<maven.fire.version>${maven.failsafe.version}</maven.fire.version>
14+
<maven.dependency.version>3.9.0</maven.dependency.version>
15+
<maven.compiler.version>3.14.1</maven.compiler.version>
16+
17+
<!-- Dependencies Versions -->
18+
<spring.ai.version>1.1.2</spring.ai.version>
19+
<awaitility.version>4.3.0</awaitility.version>
20+
<micrometer.version>1.16.2</micrometer.version>
21+
<commons.logging.version>1.3.5</commons.logging.version>
22+
<spring_boot_version>3.5.9</spring_boot_version>
23+
<postgresql.version>42.7.9</postgresql.version>
1024
</properties>
1125

1226
<!-- one-liner to take you to the cloud with settings form the application.yaml file: -->
@@ -20,7 +34,7 @@
2034
<parent>
2135
<groupId>ca.uhn.hapi.fhir</groupId>
2236
<artifactId>hapi-fhir</artifactId>
23-
<version>8.6.0</version>
37+
<version>8.6.1</version>
2438
</parent>
2539

2640
<artifactId>hapi-fhir-jpaserver-starter</artifactId>
@@ -73,6 +87,7 @@
7387
<dependency>
7488
<groupId>org.postgresql</groupId>
7589
<artifactId>postgresql</artifactId>
90+
<version>${postgresql.version}</version>
7691
</dependency>
7792
<dependency>
7893
<groupId>com.microsoft.sqlserver</groupId>
@@ -222,7 +237,7 @@
222237
<dependency>
223238
<groupId>commons-logging</groupId>
224239
<artifactId>commons-logging</artifactId>
225-
<version>1.2</version>
240+
<version>${commons.logging.version}</version>
226241
<scope>provided</scope>
227242
</dependency>
228243

@@ -344,7 +359,7 @@
344359
<dependency>
345360
<groupId>org.awaitility</groupId>
346361
<artifactId>awaitility</artifactId>
347-
<version>4.2.0</version>
362+
<version>${awaitility.version}</version>
348363
<scope>test</scope>
349364
</dependency>
350365

@@ -364,41 +379,41 @@
364379
<dependency>
365380
<groupId>io.micrometer</groupId>
366381
<artifactId>micrometer-core</artifactId>
367-
<version>1.13.3</version>
382+
<version>${micrometer.version}</version>
368383
</dependency>
369384

370385
<!-- https://mvnrepository.com/artifact/io.micrometer/micrometer-registry-prometheus -->
371386
<dependency>
372387
<groupId>io.micrometer</groupId>
373388
<artifactId>micrometer-registry-prometheus</artifactId>
374-
<version>1.13.3</version>
389+
<version>${micrometer.version}</version>
375390
</dependency>
376391

377392
<!-- https://mvnrepository.com/artifact/io.micrometer/micrometer-registry-prometheus-simpleclient -->
378393
<dependency>
379394
<groupId>io.micrometer</groupId>
380395
<artifactId>micrometer-registry-prometheus-simpleclient</artifactId>
381-
<version>1.13.3</version>
396+
<version>${micrometer.version}</version>
382397
</dependency>
383398

384399

385400
<dependency>
386401
<groupId>com.zaxxer</groupId>
387402
<artifactId>HikariCP</artifactId>
388-
<version>5.0.1</version>
403+
<version>5.1.0</version>
389404
</dependency>
390405

391406
<dependency>
392407
<groupId>org.springframework.ai</groupId>
393408
<artifactId>spring-ai-mcp</artifactId>
394-
<version>1.1.0-M2</version>
409+
<version>${spring.ai.version}</version>
395410
</dependency>
396411

397412
<!--implementation("org.springframework.ai:spring-ai-starter-mcp-server-webmvc:1.1.0-M1")-->
398413
<dependency>
399414
<groupId>org.springframework.ai</groupId>
400415
<artifactId>spring-ai-starter-mcp-server</artifactId>
401-
<version>1.1.0-M2</version>
416+
<version>${spring.ai.version}</version>
402417
</dependency>
403418

404419
<dependency>
@@ -433,12 +448,12 @@
433448
<plugin>
434449
<groupId>org.apache.maven.plugins</groupId>
435450
<artifactId>maven-dependency-plugin</artifactId>
436-
<version>3.6.0</version>
451+
<version>${maven.dependency.version}</version>
437452
</plugin>
438453
<plugin>
439454
<groupId>org.apache.maven.plugins</groupId>
440-
<artifactId>maven-surefire-plugin</artifactId>
441-
<version>3.4.0</version>
455+
<artifactId>maven-fire-plugin</artifactId>
456+
<version>${maven.fire.version}</version>
442457
</plugin>
443458
</plugins>
444459
</pluginManagement>
@@ -474,7 +489,7 @@
474489
<plugin>
475490
<groupId>org.apache.maven.plugins</groupId>
476491
<artifactId>maven-compiler-plugin</artifactId>
477-
<version>3.13.0</version>
492+
<version>${maven.compiler.version}</version>
478493
<configuration>
479494
<release>${java.version}</release>
480495
</configuration>
@@ -505,7 +520,7 @@
505520
<plugin>
506521
<groupId>org.apache.maven.plugins</groupId>
507522
<artifactId>maven-failsafe-plugin</artifactId>
508-
<version>3.4.0</version>
523+
<version>${maven.failsafe.version}</version>
509524
<configuration>
510525
<redirectTestOutputToFile>true</redirectTestOutputToFile>
511526
</configuration>
@@ -677,62 +692,6 @@
677692
</dependency>
678693
</dependencies>
679694
</profile>
680-
<profile>
681-
<id>ossrh-repo</id>
682-
<activation>
683-
<activeByDefault>false</activeByDefault>
684-
<property>
685-
<name>deployToSonatype</name>
686-
</property>
687-
</activation>
688-
<distributionManagement>
689-
<snapshotRepository>
690-
<id>ossrh</id>
691-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
692-
</snapshotRepository>
693-
<repository>
694-
<id>ossrh</id>
695-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
696-
</repository>
697-
</distributionManagement>
698-
<build>
699-
<plugins>
700-
<plugin>
701-
<groupId>org.sonatype.plugins</groupId>
702-
<artifactId>nexus-staging-maven-plugin</artifactId>
703-
<version>1.6.13</version>
704-
<extensions>true</extensions>
705-
<configuration>
706-
<serverId>ossrh</serverId>
707-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
708-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
709-
</configuration>
710-
</plugin>
711-
<plugin>
712-
<groupId>org.apache.maven.plugins</groupId>
713-
<artifactId>maven-gpg-plugin</artifactId>
714-
<version>1.6</version>
715-
<executions>
716-
<execution>
717-
<id>sign-artifacts</id>
718-
<phase>verify</phase>
719-
<goals>
720-
<goal>sign</goal>
721-
</goals>
722-
<configuration>
723-
<keyname>${gpg.keyname}</keyname>
724-
<passphraseServerId>${gpg.keyname}</passphraseServerId>
725-
<gpgArguments>
726-
<arg>--pinentry-mode</arg>
727-
<arg>loopback</arg>
728-
</gpgArguments>
729-
</configuration>
730-
</execution>
731-
</executions>
732-
</plugin>
733-
</plugins>
734-
</build>
735-
</profile>
736695
<!-- For connecting to GCP CloudSQL Postgres instances:
737696
https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/blob/main/docs/jdbc.md#postgres-1
738697
Needs 'boot' profile as well. -->
@@ -742,7 +701,7 @@
742701
<dependency>
743702
<groupId>com.google.cloud.sql</groupId>
744703
<artifactId>postgres-socket-factory</artifactId>
745-
<version>1.17.0</version>
704+
<version>1.28.0</version>
746705
</dependency>
747706
</dependencies>
748707
</profile>

0 commit comments

Comments
 (0)