diff --git a/Containers/talk/Dockerfile b/Containers/talk/Dockerfile index efa44ce0..77d1d51d 100644 --- a/Containers/talk/Dockerfile +++ b/Containers/talk/Dockerfile @@ -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" diff --git a/Containers/talk/healthcheck.sh b/Containers/talk/healthcheck.sh new file mode 100644 index 00000000..82e660ea --- /dev/null +++ b/Containers/talk/healthcheck.sh @@ -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