-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit '2daf365bdf0c6826bb0ebd3cbe12110877584dad' into rel_6_0_1
# Conflicts: # pom.xml
- Loading branch information
Showing
27 changed files
with
858 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,43 @@ | ||
FROM maven:3.8.2-jdk-11-slim as build-hapi | ||
FROM maven:3.8-openjdk-17-slim as build-hapi | ||
WORKDIR /tmp/hapi-fhir-jpaserver-starter | ||
|
||
COPY pom.xml . | ||
COPY server.xml . | ||
RUN mvn -ntp dependency:go-offline | ||
|
||
COPY src/ /tmp/hapi-fhir-jpaserver-starter/src/ | ||
RUN mvn clean install -DskipTests | ||
RUN mvn clean install -DskipTests -Djdk.lang.Process.launchMechanism=vfork | ||
|
||
FROM build-hapi AS build-distroless | ||
RUN mvn package spring-boot:repackage -Pboot | ||
RUN mkdir /app && \ | ||
cp /tmp/hapi-fhir-jpaserver-starter/target/ROOT.war /app/main.war | ||
RUN mkdir /app && cp /tmp/hapi-fhir-jpaserver-starter/target/ROOT.war /app/main.war | ||
|
||
FROM gcr.io/distroless/java-debian11:11 AS release-distroless | ||
|
||
########### bitnami tomcat version is suitable for debugging and comes with a shell | ||
########### it can be built using eg. `docker build --target tomcat .` | ||
FROM bitnami/tomcat:9.0 as tomcat | ||
|
||
RUN rm -rf /opt/bitnami/tomcat/webapps/ROOT && \ | ||
rm -rf /opt/bitnami/tomcat/webapps_default/ROOT && \ | ||
mkdir -p /opt/bitnami/hapi/data/hapi/lucenefiles && \ | ||
chmod 775 /opt/bitnami/hapi/data/hapi/lucenefiles | ||
|
||
USER root | ||
RUN mkdir -p /target && chown -R 1001:1001 target | ||
USER 1001 | ||
|
||
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_default/ROOT.war | ||
|
||
ENV ALLOW_EMPTY_PASSWORD=yes | ||
|
||
########### distroless brings focus on security and runs on plain spring boot - this is the default image | ||
FROM gcr.io/distroless/java17:nonroot as default | ||
COPY --chown=nonroot:nonroot --from=build-distroless /app /app | ||
# 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. | ||
USER 65532:65532 | ||
WORKDIR /app | ||
CMD ["/app/main.war"] | ||
|
||
FROM tomcat:9.0.53-jdk11-openjdk-slim-bullseye | ||
|
||
RUN mkdir -p /data/hapi/lucenefiles && chmod 775 /data/hapi/lucenefiles | ||
COPY --from=build-hapi /tmp/hapi-fhir-jpaserver-starter/target/*.war /usr/local/tomcat/webapps/ | ||
|
||
COPY catalina.properties /usr/local/tomcat/conf/catalina.properties | ||
COPY server.xml /usr/local/tomcat/conf/server.xml | ||
|
||
CMD ["catalina.sh", "run"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
dependencies: | ||
- name: postgresql | ||
repository: https://charts.bitnami.com/bitnami | ||
version: 10.12.2 | ||
digest: sha256:38ee315eae1af3e3f6eb20e1dd8ffd60d4ab7ee0c51bf26941b56c8bcb376c11 | ||
generated: "2021-10-07T00:19:18.9743522+02:00" | ||
version: 11.1.19 | ||
digest: sha256:5bb38230bfa62c63547851e6f46f66a61441a4a4f18e3689827546277e34d192 | ||
generated: "2022-04-08T21:55:34.6868891+02:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
ingress: | ||
enabled: true | ||
|
||
postgresql: | ||
auth: | ||
postgresPassword: secretpassword |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.