Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,27 @@ COPY ./profiles/prod /build/profiles/prod
RUN mvn clean package spring-boot:repackage -Pprod

# distributed docker image
FROM eclipse-temurin:25.0.1_8-jre
FROM eclipse-temurin:25.0.2_10-jre

# Application Insights version
ARG APPINSIGHTS_VERSION=3.7.7

# expose server port
EXPOSE 8080

# download script for reading docker secrets
ADD --chmod=755 https://raw.githubusercontent.com/HSLdevcom/jore4-tools/main/docker/read-secrets.sh /tmp/read-secrets.sh
# download script for reading Docker secrets
ADD --chmod=555 https://raw.githubusercontent.com/HSLdevcom/jore4-tools/main/docker/read-secrets.sh /tmp/read-secrets.sh

# Downaload a Java applet to perform HEALTHCHECK with
ADD --chmod=444 https://raw.githubusercontent.com/HSLdevcom/jore4-tools/main/docker/HealthCheck.jar /app/scripts/HealthCheck.jar

# Connection string is provided as env in Kubernetes by secrets manager
# it should not be provided for other environments (local etc)
ADD --chmod=755 https://github.com/microsoft/ApplicationInsights-Java/releases/download/${APPINSIGHTS_VERSION}/applicationinsights-agent-${APPINSIGHTS_VERSION}.jar /usr/src/jore4-jore3-importer/applicationinsights-agent.jar
COPY --chmod=755 ./applicationinsights.json /usr/src/jore4-jore3-importer/applicationinsights.json
ADD --chmod=444 https://github.com/microsoft/ApplicationInsights-Java/releases/download/${APPINSIGHTS_VERSION}/applicationinsights-agent-${APPINSIGHTS_VERSION}.jar /usr/src/jore4-jore3-importer/applicationinsights-agent.jar
COPY --chmod=444 ./applicationinsights.json /usr/src/jore4-jore3-importer/applicationinsights.json

# copy over helper scripts
COPY ./build-jdbc-urls.sh /tmp/
# add helper script for constructing JDBC URL
COPY --chmod=555 ./build-jdbc-urls.sh /tmp/

# copy over compiled jar
COPY --from=builder /build/target/*.jar /usr/src/jore4-jore3-importer/importer.jar
Expand All @@ -41,4 +44,4 @@ CMD ["/bin/bash", "-c", \
"source /tmp/read-secrets.sh && source /tmp/build-jdbc-urls.sh && java -javaagent:/usr/src/jore4-jore3-importer/applicationinsights-agent.jar -jar /usr/src/jore4-jore3-importer/importer.jar"]

HEALTHCHECK --interval=1m --timeout=5s \
CMD curl --fail http://localhost:8080/actuator/health
CMD ["java", "-jar", "/app/scripts/HealthCheck.jar"]
6 changes: 0 additions & 6 deletions docker/docker-compose.custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,8 @@ services:
- jore4

jore4-mssqltestdb:
# pin compatible version of mssql schema
image: "hsldevcom/jore4-mssql-testdb:schema-only-main--20250508-348cac964ff6a08b3776f003ddd036e4505cda18"
# volume to easily use jore3 database dump
volumes:
- ../jore3dump:/mnt/jore3dump

jore4-hasura:
# pin compatible version of jore4 data model
image: "crjore4prod001.azurecr.io/jore4-hsl-hasura:main-2025-12-08-40a4f283c88076a5865ec1eab5713917f09bb3c5"
networks:
jore4:
Loading