diff --git a/docker/docker-files/Dockerfile b/docker/docker-files/Dockerfile index d0d27e8..141b8b4 100644 --- a/docker/docker-files/Dockerfile +++ b/docker/docker-files/Dockerfile @@ -17,7 +17,7 @@ RUN mvn install \ ################### # PACKAGING STAGE # ################### -FROM gisaia/arlas-openjdk:17-distroless +FROM gisaia/arlas-openjdk-17-distroless:20240325094836 # application placed into /opt/app WORKDIR /opt/app @@ -25,8 +25,5 @@ COPY --from=build /opt/build/arlas-tagger.jar /opt/app/ COPY --from=build /opt/build/conf/configuration.yaml /opt/app/ EXPOSE 9998 -HEALTHCHECK --interval=5m --timeout=3s \ - CMD curl http://localhost:9998/admin/healthcheck | grep -v "\"healthy\":false" || exit 1 - ENV JDK_JAVA_OPTIONS="-Xmx512m -XX:+ExitOnOutOfMemoryError" CMD ["arlas-tagger.jar", "server", "/opt/app/configuration.yaml"] diff --git a/docker/docker-files/Dockerfile-package-only b/docker/docker-files/Dockerfile-package-only index 7729e4f..507b1e4 100644 --- a/docker/docker-files/Dockerfile-package-only +++ b/docker/docker-files/Dockerfile-package-only @@ -1,7 +1,7 @@ ################### # PACKAGING STAGE # ################### -FROM gisaia/arlas-openjdk:17-distroless +FROM gisaia/arlas-openjdk-17-distroless:20240325094836 # application placed into /opt/app WORKDIR /opt/app @@ -9,8 +9,5 @@ ADD arlas-tagger/target/arlas-tagger*.jar /opt/app/arlas-tagger.jar ADD conf/configuration.yaml /opt/app/configuration.yaml EXPOSE 9998 -HEALTHCHECK --interval=5m --timeout=3s \ - CMD curl http://localhost:9998/admin/healthcheck | grep -v "\"healthy\":false" || exit 1 - ENV JDK_JAVA_OPTIONS="-Xmx512m -XX:+ExitOnOutOfMemoryError" CMD ["arlas-tagger.jar", "server", "/opt/app/configuration.yaml"] diff --git a/docker/docker-files/docker-compose-arlas-server.yml b/docker/docker-files/docker-compose-arlas-server.yml index edde4ef..a9358c0 100644 --- a/docker/docker-files/docker-compose-arlas-server.yml +++ b/docker/docker-files/docker-compose-arlas-server.yml @@ -2,7 +2,7 @@ version: '3' services: arlas-server: - image: gisaia/arlas-server:${ARLAS_VERSION:-24.0.1} + image: gisaia/arlas-server:${ARLAS_VERSION:-24.1.2} container_name: arlas-server environment: - ARLAS_HOST="arlas-server" @@ -16,4 +16,9 @@ services: - ARLAS_SERVICE_EXPLORE_ENABLE="${ARLAS_SERVICE_EXPLORE_ENABLE:-true}" ports: - 19999:9999 + healthcheck: + test: ["CMD","java","HttpHealthcheck.java","http://localhost:9999/admin/healthcheck"] + interval: 5s + timeout: 10s + retries: 3 diff --git a/docker/docker-files/docker-compose.yml b/docker/docker-files/docker-compose.yml index 854e4f2..cae6e70 100644 --- a/docker/docker-files/docker-compose.yml +++ b/docker/docker-files/docker-compose.yml @@ -48,3 +48,8 @@ services: - 19998:9998 volumes: - ${ARLAS_AUTH_LOCAL_CERT_FILE:-/tmp}:${ARLAS_AUTH_CERT_FILE:-/opt/app/arlas.pem}:ro + healthcheck: + test: ["CMD","java","HttpHealthcheck.java","http://localhost:9998/admin/healthcheck"] + interval: 5s + timeout: 10s + retries: 3