From c87a31364e6353159e8d5f253bfcbd25f248333d Mon Sep 17 00:00:00 2001 From: rockyluke Date: Sun, 30 Jul 2023 16:28:36 +0200 Subject: [PATCH 1/3] feat: add healthcheck in Dockerfile Handle container status with basic healthcheck --- docker/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker/Dockerfile b/docker/Dockerfile index a8370dcac0..3044b28e78 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -18,6 +18,8 @@ RUN apk add --no-cache --virtual .buildtools make gcc g++ python3 linux-headers # Release FROM base as release +RUN apk add --no-cache curl + COPY --from=dependencies_and_build /app/node_modules ./node_modules COPY dist ./dist COPY package.json LICENSE index.js data/configuration.yaml ./ @@ -34,3 +36,4 @@ ENV NODE_ENV production ENTRYPOINT ["docker-entrypoint.sh"] CMD [ "/sbin/tini", "--", "node", "index.js"] +HEALTHCHECK --interval=1m --timeout=10s CMD curl -f http://192.168.178.5:8080/#/ || exit 1 From 63c1db963cdedf985ba3ac97740bea9c583bea51 Mon Sep 17 00:00:00 2001 From: rockyluke Date: Sun, 30 Jul 2023 16:32:40 +0200 Subject: [PATCH 2/3] Update Dockerfile --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 3044b28e78..028faf1dcc 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -36,4 +36,4 @@ ENV NODE_ENV production ENTRYPOINT ["docker-entrypoint.sh"] CMD [ "/sbin/tini", "--", "node", "index.js"] -HEALTHCHECK --interval=1m --timeout=10s CMD curl -f http://192.168.178.5:8080/#/ || exit 1 +HEALTHCHECK --interval=1m --timeout=10s CMD curl -f http://127.0.0.1:8080/#/ || exit 1 From ae9bce8a26bf81cd8b7d4aa6d8ee6c92d8eb7b2c Mon Sep 17 00:00:00 2001 From: rockyluke Date: Mon, 31 Jul 2023 16:59:19 +0200 Subject: [PATCH 3/3] Update Dockerfile --- docker/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 028faf1dcc..f25210bdc9 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -36,4 +36,3 @@ ENV NODE_ENV production ENTRYPOINT ["docker-entrypoint.sh"] CMD [ "/sbin/tini", "--", "node", "index.js"] -HEALTHCHECK --interval=1m --timeout=10s CMD curl -f http://127.0.0.1:8080/#/ || exit 1