mirror of
https://github.com/nextcloud/all-in-one.git
synced 2024-12-28 17:50:41 +08:00
Merge pull request #3188 from nextcloud/enh/noid/improve-talk-healthcheck
talk - improve healthcheck
This commit is contained in:
commit
ede981fc31
2 changed files with 13 additions and 1 deletions
|
@ -41,6 +41,7 @@ COPY --from=nats /nats-server /usr/local/bin/nats-se
|
|||
COPY --from=signaling /usr/bin/nextcloud-spreed-signaling /usr/local/bin/nextcloud-spreed-signaling
|
||||
|
||||
COPY --chmod=775 start.sh /start.sh
|
||||
COPY --chmod=775 healthcheck.sh /healthcheck.sh
|
||||
COPY --chmod=664 supervisord.conf /supervisord.conf
|
||||
|
||||
RUN set -ex; \
|
||||
|
@ -102,5 +103,5 @@ USER eturnal
|
|||
ENTRYPOINT ["/start.sh"]
|
||||
CMD ["supervisord", "-c", "/supervisord.conf"]
|
||||
|
||||
HEALTHCHECK CMD (nc -z localhost 8081 && nc -z localhost 8188 && nc -z localhost 4222 && nc -z localhost "$TALK_PORT" && nc -z "$NC_DOMAIN" "$TALK_PORT" && eturnalctl status) || exit 1
|
||||
HEALTHCHECK CMD /healthcheck.sh
|
||||
LABEL com.centurylinklabs.watchtower.enable="false"
|
||||
|
|
11
Containers/talk/healthcheck.sh
Normal file
11
Containers/talk/healthcheck.sh
Normal file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
nc -z localhost 8081 || exit 1
|
||||
nc -z localhost 8188 || exit 1
|
||||
nc -z localhost 4222 || exit 1
|
||||
nc -z localhost "$TALK_PORT" || exit 1
|
||||
eturnalctl status || exit 1
|
||||
if ! nc -z "$NC_DOMAIN" "$TALK_PORT"; then
|
||||
echo "Could not reach $NC_DOMAIN on port $TALK_PORT."
|
||||
exit 1
|
||||
fi
|
Loading…
Reference in a new issue