Skip to content

Commit

Permalink
Merge pull request #3208 from nextcloud/enh/3197/improve-notify-push
Browse files Browse the repository at this point in the history
ntofiy-push - improve healthcheck
  • Loading branch information
szaimen authored Aug 18, 2023
2 parents f17c2f5 + 60a692a commit cf41079
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Containers/notify-push/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand All @@ -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"
7 changes: 7 additions & 0 deletions Containers/notify-push/healthcheck.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

if ! nc -z "$NEXTCLOUD_HOST" 9000; then
exit 0
fi

nc -z localhost 7867 || exit 1

0 comments on commit cf41079

Please sign in to comment.