diff --git a/Containers/notify-push/Dockerfile b/Containers/notify-push/Dockerfile index 047c911d4d8..225c021bf10 100644 --- a/Containers/notify-push/Dockerfile +++ b/Containers/notify-push/Dockerfile @@ -1,6 +1,7 @@ FROM alpine:3.18.2 COPY --chmod=775 start.sh /start.sh +COPY --chmod=775 healthcheck.sh /healthcheck.sh RUN set -ex; \ apk add --no-cache \ @@ -17,5 +18,5 @@ RUN set -ex; \ USER 33 ENTRYPOINT ["/start.sh"] -HEALTHCHECK CMD nc -z localhost 7867 || exit 1 +HEALTHCHECK CMD /healthcheck.sh LABEL com.centurylinklabs.watchtower.enable="false" diff --git a/Containers/notify-push/healthcheck.sh b/Containers/notify-push/healthcheck.sh new file mode 100644 index 00000000000..8dce437ec8a --- /dev/null +++ b/Containers/notify-push/healthcheck.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +if ! nc -z "$NEXTCLOUD_HOST" 9000; then + exit 0 +fi + +nc -z localhost 7867 || exit 1