Skip to content

Commit

Permalink
Merge pull request #165 from gisaia/feat/rmdockerfilehc
Browse files Browse the repository at this point in the history
Remove HC from Dockerfile
  • Loading branch information
alainbodiguel authored Mar 26, 2024
2 parents c458d23 + 4ac6ace commit 0ad733d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 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/arlas-iam-core/src/main/resources/templates/*.ftlh /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-iam-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 arlas-iam-server/target/arlas-iam-server*.jar /opt/app/arlas-iam-server.jar
ADD conf/configuration.yaml /opt/app/configuration.yaml
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-iam-server.jar", "server", "/opt/app/configuration.yaml"]
12 changes: 11 additions & 1 deletion docker/docker-files/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,14 @@ services:
# - JDK_JAVA_OPTIONS=-javaagent:/opt/app/elastic-apm-agent.jar
ports:
- "9997:9997"
healthcheck:
test: ["CMD","java","HttpHealthcheck.java","http://localhost:9997/admin/healthcheck"]
interval: 5s
timeout: 10s
retries: 3

arlas-server:
image: gisaia/arlas-server:24.0.4-SNAPSHOT
image: gisaia/arlas-server:24.1.2
container_name: arlas-server
labels:
co.elastic.logs/enabled: true
Expand Down Expand Up @@ -120,6 +125,11 @@ services:
# - JDK_JAVA_OPTIONS=-javaagent:/opt/app/elastic-apm-agent.jar
ports:
- "9999:9999"
healthcheck:
test: ["CMD","java","HttpHealthcheck.java","http://localhost:9999/admin/healthcheck"]
interval: 5s
timeout: 10s
retries: 3

volumes:
arlas-iam-db:
Expand Down

0 comments on commit 0ad733d

Please sign in to comment.