From 43af825f4788cf6fdf640f611de081908b8d4f40 Mon Sep 17 00:00:00 2001 From: Amir Zarrinkafsh Date: Thu, 5 Nov 2020 11:59:06 +1100 Subject: [PATCH] [FEATURE] Add health checks to containers (#1425) --- Dockerfile | 8 +++++--- Dockerfile.arm32v7 | 8 +++++--- Dockerfile.arm64v8 | 8 +++++--- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1793cdbc7..ccb83f8a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -62,9 +62,11 @@ EXPOSE 9091 VOLUME /config -ENV PATH="/app:${PATH}" -ENV PUID=0 -ENV PGID=0 +# Set environment variables +ENV PATH="/app:${PATH}" \ +PUID=0 \ +PGID=0 ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] CMD ["--config", "/config/configuration.yml"] +HEALTHCHECK --interval=30s --timeout=3s CMD wget --quiet --tries=1 --spider http://localhost:9091/api/state || exit 1 diff --git a/Dockerfile.arm32v7 b/Dockerfile.arm32v7 index fb8aef771..301a15745 100644 --- a/Dockerfile.arm32v7 +++ b/Dockerfile.arm32v7 @@ -68,9 +68,11 @@ EXPOSE 9091 VOLUME /config -ENV PATH="/app:${PATH}" -ENV PUID=0 -ENV PGID=0 +# Set environment variables +ENV PATH="/app:${PATH}" \ +PUID=0 \ +PGID=0 ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] CMD ["--config", "/config/configuration.yml"] +HEALTHCHECK --interval=30s --timeout=3s CMD wget --quiet --tries=1 --spider http://localhost:9091/api/state || exit 1 diff --git a/Dockerfile.arm64v8 b/Dockerfile.arm64v8 index cc0d3dd16..419768022 100644 --- a/Dockerfile.arm64v8 +++ b/Dockerfile.arm64v8 @@ -68,9 +68,11 @@ EXPOSE 9091 VOLUME /config -ENV PATH="/app:${PATH}" -ENV PUID=0 -ENV PGID=0 +# Set environment variables +ENV PATH="/app:${PATH}" \ +PUID=0 \ +PGID=0 ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] CMD ["--config", "/config/configuration.yml"] +HEALTHCHECK --interval=30s --timeout=3s CMD wget --quiet --tries=1 --spider http://localhost:9091/api/state || exit 1