From 6dd8342bf08188622116e242122bb25b42085d93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Vos?= Date: Sun, 15 Aug 2021 15:34:17 +0200 Subject: Add healthcheck to Dockerfile --- Dockerfile | 3 +++ Dockerfile.arm32v7 | 3 +++ Dockerfile.arm64v8 | 3 +++ 3 files changed, 9 insertions(+) diff --git a/Dockerfile b/Dockerfile index 19d01f8..d7179fc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,6 +25,9 @@ COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets COPY entrypoint.sh /entrypoint.sh +HEALTHCHECK --interval=5s --timeout=5s --retries=3 \ + CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:${PORT}/ || exit 1 + EXPOSE ${PORT} VOLUME /www/assets ENTRYPOINT ["/bin/sh", "/entrypoint.sh"] diff --git a/Dockerfile.arm32v7 b/Dockerfile.arm32v7 index 3efb5aa..1621abb 100644 --- a/Dockerfile.arm32v7 +++ b/Dockerfile.arm32v7 @@ -35,6 +35,9 @@ COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets COPY entrypoint.sh /entrypoint.sh +HEALTHCHECK --interval=5s --timeout=5s --retries=3 \ + CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:${PORT}/ || exit 1 + EXPOSE ${PORT} VOLUME /www/assets ENTRYPOINT ["/bin/sh", "/entrypoint.sh"] diff --git a/Dockerfile.arm64v8 b/Dockerfile.arm64v8 index e6d0a51..fe35ede 100644 --- a/Dockerfile.arm64v8 +++ b/Dockerfile.arm64v8 @@ -35,6 +35,9 @@ COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets COPY entrypoint.sh /entrypoint.sh +HEALTHCHECK --interval=5s --timeout=5s --retries=3 \ + CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:${PORT}/ || exit 1 + EXPOSE ${PORT} VOLUME /www/assets ENTRYPOINT ["/bin/sh", "/entrypoint.sh"] -- cgit v1.2.3