Skip to content

Commit cf41079

Browse files
authored
Merge pull request #3208 from nextcloud/enh/3197/improve-notify-push
ntofiy-push - improve healthcheck
2 parents f17c2f5 + 60a692a commit cf41079

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Containers/notify-push/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
FROM alpine:3.18.2
22

33
COPY --chmod=775 start.sh /start.sh
4+
COPY --chmod=775 healthcheck.sh /healthcheck.sh
45

56
RUN set -ex; \
67
apk add --no-cache \
@@ -17,5 +18,5 @@ RUN set -ex; \
1718
USER 33
1819
ENTRYPOINT ["/start.sh"]
1920

20-
HEALTHCHECK CMD nc -z localhost 7867 || exit 1
21+
HEALTHCHECK CMD /healthcheck.sh
2122
LABEL com.centurylinklabs.watchtower.enable="false"

Containers/notify-push/healthcheck.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
if ! nc -z "$NEXTCLOUD_HOST" 9000; then
4+
exit 0
5+
fi
6+
7+
nc -z localhost 7867 || exit 1

0 commit comments

Comments
 (0)