From f69574e43a052cee6b4a99aa84acd7588909ad13 Mon Sep 17 00:00:00 2001 From: Stefan Van Dyck Date: Thu, 1 Aug 2024 13:33:36 +0200 Subject: [PATCH] #23: Add logger service in order to properly fix biocache hub dependency --- config/logger/logger.yml | 14 ++++++++++++++ docker/atlas-all/Dockerfile | 15 +++++++++++++++ docker/logger/Dockerfile | 6 +++--- 3 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 config/logger/logger.yml diff --git a/config/logger/logger.yml b/config/logger/logger.yml new file mode 100644 index 00000000..2bd9a5c7 --- /dev/null +++ b/config/logger/logger.yml @@ -0,0 +1,14 @@ +--- +### OIDC Credentials ### +security: + jwt: + clientId: logger + oidc: + clientId: logger + secret: logger-oidc-super-secret +webservice: + client-id: logger + client-secret: xxx + +grails: + serverURL: ${common.protocol}://logger.${common.domain}/ws diff --git a/docker/atlas-all/Dockerfile b/docker/atlas-all/Dockerfile index c6b7424a..9ef13ce3 100644 --- a/docker/atlas-all/Dockerfile +++ b/docker/atlas-all/Dockerfile @@ -81,6 +81,18 @@ RUN --mount=type=cache,target=/home/gradle/.gradle/caches \ # -Dorg.gradle.debug=true -Dorg.gradle.debug.suspend=no --debug \ --parallel +######################################### LOGGER SERVICE ######################################### +FROM gradle:7-jdk11 AS logger-service-builder + +ARG LOGGER_SERVICE_VERSION=4.3 +WORKDIR /project +RUN git clone --branch v${LOGGER_SERVICE_VERSION} --depth 1 https://github.com/AtlasOfLivingAustralia/logger-service.git /project +RUN --mount=type=cache,target=/home/gradle/.gradle/caches \ + gradle build assemble --no-daemon \ + -x test -x integrationTest \ + # -Dorg.gradle.debug=true -Dorg.gradle.debug.suspend=no --debug \ + --parallel + ######################################### REGIONS ######################################### FROM gradle:7-jdk11 AS regions-builder @@ -153,6 +165,7 @@ ARG BIE_INDEX_VERSION=3.1.0 ARG BIOCACHE_HUB_VERSION=7.0.0 ARG BIOCACHE_SERVICE_VERSION=3.4.1 ARG COLLECTORY_VERSION=5.2.0-SNAPSHOT +ARG LOGGER_SERVICE_VERSION=4.3 ARG IMAGE_SERVICE_VERSION=3.0.0 ARG REGIONS_VERSION=4.0.0 ARG SPATIAL_HUB_VERSION=2.1.0 @@ -169,6 +182,8 @@ COPY --from=biocache-service-builder \ /project/build/libs/biocache-service-${BIOCACHE_SERVICE_VERSION}.war ${CATALINA_HOME}/webapps/biocache-service.war COPY --from=collectory-builder \ /project/build/libs/collectory-${COLLECTORY_VERSION}-plain.war ${CATALINA_HOME}/webapps/collectory.war +COPY --from=logger-service-builder \ + /project/build/libs/logger-service-${IMAGE_SERVICE_VERSION}-plain.war ${CATALINA_HOME}/webapps/logger-service.war COPY --from=image-service-builder \ /project/build/libs/image-service-${IMAGE_SERVICE_VERSION}-plain.war ${CATALINA_HOME}/webapps/image-service.war COPY --from=regions-builder \ diff --git a/docker/logger/Dockerfile b/docker/logger/Dockerfile index 049d2190..67ded06b 100644 --- a/docker/logger/Dockerfile +++ b/docker/logger/Dockerfile @@ -1,6 +1,6 @@ FROM gradle:7-jdk11 AS builder -ARG VERSION=v3.0.3 +ARG VERSION=v4.3 WORKDIR /project RUN git clone --branch ${VERSION} --depth 1 https://github.com/AtlasOfLivingAustralia/logger-service.git /project @@ -12,9 +12,9 @@ RUN --mount=type=cache,target=/home/gradle/.gradle/caches \ FROM openjdk:11 -ARG VERSION=3.0.3 +ARG VERSION=4.3 -COPY --from=builder /project/build/libs/logger-service-${VERSION}-exec.war /app.war +COPY --from=builder /project/build/libs/logger-service-${VERSION}.war /app.war VOLUME /data ENTRYPOINT ["java", "-jar", "/app.war"]