From c65d2bd2fca045f10a625040a93a136fbf2684fb Mon Sep 17 00:00:00 2001 From: Sebastian Denz Date: Tue, 2 Jul 2024 17:50:25 +0200 Subject: [PATCH] feat(jigasi,jicofo,jvb,jibri,prosody): add healthcheck.sh scripts and prosody http_health mod --- base/Dockerfile | 2 +- jicofo/rootfs/usr/local/bin/healthcheck.sh | 3 +++ jigasi/rootfs/usr/local/bin/healthcheck.sh | 3 +++ jvb/rootfs/usr/local/bin/healthcheck.sh | 3 +++ prosody/Dockerfile | 1 + prosody/rootfs/defaults/prosody.cfg.lua | 1 + prosody/rootfs/usr/local/bin/healthcheck.sh | 3 +++ 7 files changed, 15 insertions(+), 1 deletion(-) create mode 100755 jicofo/rootfs/usr/local/bin/healthcheck.sh create mode 100755 jigasi/rootfs/usr/local/bin/healthcheck.sh create mode 100755 jvb/rootfs/usr/local/bin/healthcheck.sh create mode 100755 prosody/rootfs/usr/local/bin/healthcheck.sh diff --git a/base/Dockerfile b/base/Dockerfile index 6329f15..37c96a5 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -13,7 +13,7 @@ RUN \ *) echo "unsupported architecture"; exit 1 ;; \ esac && \ apt-dpkg-wrap apt-get update && \ - apt-dpkg-wrap apt-get install -y apt-transport-https apt-utils ca-certificates gnupg wget && \ + apt-dpkg-wrap apt-get install -y apt-transport-https apt-utils ca-certificates gnupg wget curl && \ wget -qO /usr/bin/tpl https://github.com/jitsi/tpl/releases/download/v1.3.0/tpl-linux-${TPL_ARCH} && \ # Workaround S6 bug when /bin is a symlink wget -qO /tmp/s6.tar.gz https://github.com/just-containers/s6-overlay/releases/download/v1.22.1.0/s6-overlay-${S6_ARCH}.tar.gz && \ diff --git a/jicofo/rootfs/usr/local/bin/healthcheck.sh b/jicofo/rootfs/usr/local/bin/healthcheck.sh new file mode 100755 index 0000000..cab491a --- /dev/null +++ b/jicofo/rootfs/usr/local/bin/healthcheck.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +curl --fail-with-body http://127.0.0.1:8888/about/health diff --git a/jigasi/rootfs/usr/local/bin/healthcheck.sh b/jigasi/rootfs/usr/local/bin/healthcheck.sh new file mode 100755 index 0000000..47061c6 --- /dev/null +++ b/jigasi/rootfs/usr/local/bin/healthcheck.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +curl --fail-with-body http://127.0.0.1:8788/about/health diff --git a/jvb/rootfs/usr/local/bin/healthcheck.sh b/jvb/rootfs/usr/local/bin/healthcheck.sh new file mode 100755 index 0000000..401d8c7 --- /dev/null +++ b/jvb/rootfs/usr/local/bin/healthcheck.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +curl --fail-with-body http://127.0.0.1:8080/about/health diff --git a/prosody/Dockerfile b/prosody/Dockerfile index 633115e..d33c9f7 100644 --- a/prosody/Dockerfile +++ b/prosody/Dockerfile @@ -57,6 +57,7 @@ RUN wget -qO /etc/apt/trusted.gpg.d/prosody.gpg https://prosody.im/files/prosody rm -rf /usr/share/lua/{5.1,5.2,5.3} && \ wget -qO /prosody-plugins/mod_auth_cyrus.lua https://hg.prosody.im/prosody-modules/raw-file/65438e4ba563/mod_auth_cyrus/mod_auth_cyrus.lua && \ wget -qO /prosody-plugins/sasl_cyrus.lua https://hg.prosody.im/prosody-modules/raw-file/65438e4ba563/mod_auth_cyrus/sasl_cyrus.lua && \ + wget -qO /prosody-plugins/mod_http_health.lua https://hg.prosody.im/prosody-modules/raw-file/2b80188448d1/mod_http_health/mod_http_health.lua && \ wget https://github.com/matrix-org/prosody-mod-auth-matrix-user-verification/archive/refs/tags/v$VERSION_MATRIX_USER_VERIFICATION_SERVICE_PLUGIN.tar.gz && \ tar -xf v$VERSION_MATRIX_USER_VERIFICATION_SERVICE_PLUGIN.tar.gz && \ mv prosody-mod-auth-matrix-user-verification-$VERSION_MATRIX_USER_VERIFICATION_SERVICE_PLUGIN/mod_auth_matrix_user_verification.lua /prosody-plugins && \ diff --git a/prosody/rootfs/defaults/prosody.cfg.lua b/prosody/rootfs/defaults/prosody.cfg.lua index 59f8c97..8c6e172 100644 --- a/prosody/rootfs/defaults/prosody.cfg.lua +++ b/prosody/rootfs/defaults/prosody.cfg.lua @@ -99,6 +99,7 @@ modules_enabled = { --"watchregistrations"; -- Alert admins of registrations --"motd"; -- Send a message to users when they log in --"legacyauth"; -- Legacy authentication. Only used by some old clients and bots. + "http_health"; {{ if eq .Env.PROSODY_MODE "brewery" -}} "firewall"; -- Enable firewalling "secure_interfaces"; diff --git a/prosody/rootfs/usr/local/bin/healthcheck.sh b/prosody/rootfs/usr/local/bin/healthcheck.sh new file mode 100755 index 0000000..81ac834 --- /dev/null +++ b/prosody/rootfs/usr/local/bin/healthcheck.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +curl --fail-with-body http://127.0.0.1:5280/health