From 397ac9e9d76ed58278a27a1be4d2d956891d32ae Mon Sep 17 00:00:00 2001 From: Michael Della Bitta Date: Mon, 27 Jan 2025 14:31:40 -0500 Subject: [PATCH 1/2] Added container healthcheck --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index ca1a53e..8ac4164 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,5 +10,6 @@ WORKDIR /opt/api COPY sentry.properties . COPY sentry-opentelemetry-agent.jar . COPY target/scala-2.13/dpla-api.jar . +HEALTHCHECK CMD ["curl", "-f", "http://localhost:8080/health-check"] EXPOSE 8080 CMD ["java", "-javaagent:sentry-opentelemetry-agent.jar", "-jar", "/opt/api/dpla-api.jar"] \ No newline at end of file From c6581960acb3f6656e0d6697bde39b83b4eac19d Mon Sep 17 00:00:00 2001 From: Michael Della Bitta Date: Mon, 27 Jan 2025 14:37:07 -0500 Subject: [PATCH 2/2] healthcheck customizations --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8ac4164..0808d71 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,6 @@ WORKDIR /opt/api COPY sentry.properties . COPY sentry-opentelemetry-agent.jar . COPY target/scala-2.13/dpla-api.jar . -HEALTHCHECK CMD ["curl", "-f", "http://localhost:8080/health-check"] +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD ["curl", "-f", "http://localhost:8080/health-check"] EXPOSE 8080 CMD ["java", "-javaagent:sentry-opentelemetry-agent.jar", "-jar", "/opt/api/dpla-api.jar"] \ No newline at end of file