Skip to content

Commit

Permalink
Remove HC from Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
alainbodiguel committed Mar 25, 2024
1 parent 4ad82e9 commit 4b29a2d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
5 changes: 1 addition & 4 deletions docker/docker-files/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -26,8 +26,5 @@ COPY --from=build /opt/build/conf/configuration.yaml /opt/app/
COPY --from=build /opt/build/docker/docker-files/pgCreateTable.sql /opt/app/
EXPOSE 9997

HEALTHCHECK --interval=5m --timeout=3s \
CMD curl http://localhost:9997/admin/healthcheck | grep -v "\"healthy\":false" || exit 1

ENV JDK_JAVA_OPTIONS="-Xmx512m -XX:+ExitOnOutOfMemoryError"
CMD ["arlas-persistence-server.jar", "server", "/opt/app/configuration.yaml"]
5 changes: 1 addition & 4 deletions docker/docker-files/Dockerfile-package-only
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -10,8 +10,5 @@ ADD conf/configuration.yaml /opt/app/configuration.yaml
ADD docker/docker-files/pgCreateTable.sql /opt/app/pgCreateTable.sql
EXPOSE 9997

HEALTHCHECK --interval=5m --timeout=3s \
CMD curl http://localhost:9997/admin/healthcheck | grep -v "\"healthy\":false" || exit 1

ENV JDK_JAVA_OPTIONS="-Xmx512m -XX:+ExitOnOutOfMemoryError"
CMD ["arlas-persistence-server.jar", "server", "/opt/app/configuration.yaml"]
5 changes: 5 additions & 0 deletions docker/docker-files/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,8 @@ services:
volumes:
- ${GOOGLE_APPLICATION_CREDENTIALS:-/tmp}:/opt/app/google-registry.json:ro
- ${ARLAS_PERSISTENCE_LOCAL_FOLDER_HOST:-/tmp/persist/}:${ARLAS_PERSISTENCE_LOCAL_FOLDER:-/tmp/persist/}:rw
healthcheck:
test: ["CMD","java","HttpHealthcheck.java","http://localhost:9997/admin/healthcheck"]
interval: 5s
timeout: 10s
retries: 3

0 comments on commit 4b29a2d

Please sign in to comment.