From 5f80297ba47a322d9f3dd1fb4bf6c01db9f5e71c Mon Sep 17 00:00:00 2001 From: Thomas Sanson Date: Sun, 3 Jul 2022 12:48:51 +0000 Subject: [PATCH 1/2] feat(docker): Add healthcheck --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 791057aaa..93fc088f6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,9 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* && \ apt-get clean +HEALTHCHECK --interval=1m --timeout=30s --retries=3 \ + CMD curl --fail http://localhost/8080 || exit 1 + WORKDIR /app COPY docker / ENV MICRONAUT_CONFIG_FILES=/app/application.yml From b89c13bb46307f4ddc2d87a5af675642fa513b2b Mon Sep 17 00:00:00 2001 From: ThomasSanson <93382375+ThomasSanson@users.noreply.github.com> Date: Sun, 3 Jul 2022 20:28:25 +0200 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Ludovic DEHON --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 93fc088f6..e5be07e33 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ RUN apt-get update && \ apt-get clean HEALTHCHECK --interval=1m --timeout=30s --retries=3 \ - CMD curl --fail http://localhost/8080 || exit 1 + CMD curl --fail http://localhost:8080/health || exit 1 WORKDIR /app COPY docker /