From b88f567d9fadffbe3396ecf7d75d20dcfe078835 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxi=20Quo=C3=9F?= Date: Sat, 11 Feb 2023 22:24:50 +0100 Subject: [PATCH] move healthcheck to dockerfile --- Dockerfile | 2 ++ docker-compose.yml | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 608341e8..14d90677 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,4 +16,6 @@ RUN apk update &&\ rm -rf /var/cache/apk/* WORKDIR /app COPY --from=downloader /app/upsnap upsnap +HEALTHCHECK --interval=10s \ + CMD curl -fs "http://localhost:8090/api/health " || exit 1 ENTRYPOINT ["./upsnap", "serve", "--http=0.0.0.0:8090"] diff --git a/docker-compose.yml b/docker-compose.yml index db62fb0a..adcfa7fa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,11 +6,6 @@ services: restart: unless-stopped volumes: - ./data:/app/pb_data - healthcheck: - test: wget --no-verbose --tries=1 --spider http://localhost:8090/api/health || exit 1 - interval: 1m - timeout: 10s - retries: 3 # environment: # - TZ=Europe/Berlin # Set container timezone for cron schedules # - UPSNAP_INTERVAL=@every 10s # Sets the interval in which the devices are pinged