Merge pull request #3188 from nextcloud/enh/noid/improve-talk-healthcheck

talk - improve healthcheck
This commit is contained in:
Simon L 2023-08-21 23:00:32 +02:00 committed by GitHub
commit ede981fc31
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View file

@ -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"

View 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