From 83408f6a9b80cf3b43f1e2994239a6d43bcb8bb2 Mon Sep 17 00:00:00 2001 From: Philip H <47042125+pheiduck@users.noreply.github.com> Date: Sat, 27 Apr 2024 18:34:20 +0200 Subject: [PATCH 1/2] add healthcheck into Dockerfile Thanks @CosasDePuma --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index cdae1edf..ecfa9262 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,7 @@ RUN npm ci --omit=dev &&\ # Copy build result to a new image. # This saves a lot of disk space. FROM docker.io/library/node:20-alpine +HEALTHCHECK --interval=1m --timeout=5s --retries=3 CMD "/usr/bin/wg show | /bin/grep -q interface || exit 1" COPY --from=build_node_modules /app /app # Move node_modules one directory up, so during development From f9656d0bfe709ff1af2c3432169ac8c3914e7d93 Mon Sep 17 00:00:00 2001 From: Philip H <47042125+pheiduck@users.noreply.github.com> Date: Sat, 27 Apr 2024 18:35:22 +0200 Subject: [PATCH 2/2] healthcheck is integrated internally --- docker-compose.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 67defaf7..5eec655e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -42,8 +42,3 @@ services: sysctls: - net.ipv4.ip_forward=1 - net.ipv4.conf.all.src_valid_mark=1 - healthcheck: - test: /usr/bin/timeout 5s /bin/sh -c "/usr/bin/wg show | /bin/grep -q interface || exit 1" - interval: 1m - timeout: 5s - retries: 3