From 263149c324770d7fa9524e7fe1b8d47502764f1c Mon Sep 17 00:00:00 2001 From: Alex Palaistras Date: Fri, 17 Nov 2023 12:59:37 +0000 Subject: [PATCH] prosody: Start on health-check pass --- service/prosody/Containerfile | 2 +- service/prosody/container/config/prosody.cfg.lua | 1 + service/prosody/quadlet/prosody.container | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/service/prosody/Containerfile b/service/prosody/Containerfile index 7d1678f..daa117a 100644 --- a/service/prosody/Containerfile +++ b/service/prosody/Containerfile @@ -1,6 +1,6 @@ FROM docker.io/debian:bookworm-slim ARG VERSION=0.12.4 -ARG MODULES_VERSION=e5ad3f1f48bd +ARG MODULES_VERSION=ef3aa6901a93 RUN apt-get update -y && apt-get install -y --no-install-recommends \ curl mercurial gnupg ca-certificates apt-transport-https diff --git a/service/prosody/container/config/prosody.cfg.lua b/service/prosody/container/config/prosody.cfg.lua index 2ba26e7..34edec9 100644 --- a/service/prosody/container/config/prosody.cfg.lua +++ b/service/prosody/container/config/prosody.cfg.lua @@ -70,6 +70,7 @@ modules_enabled = { -- HTTP modules "websocket"; -- XMPP over WebSockets "http_openmetrics"; -- Enables metrics collection in OpenMetrics-compatible format. + "http_health"; -- Enabled health-checks over HTTP. -- Other specific functionality "conversejs"; -- Web-based frontend for XMPP diff --git a/service/prosody/quadlet/prosody.container b/service/prosody/quadlet/prosody.container index fcd8edd..c47f05f 100644 --- a/service/prosody/quadlet/prosody.container +++ b/service/prosody/quadlet/prosody.container @@ -4,10 +4,13 @@ Wants=container-build@%N.service container-volume@%N.service lldap.service grafa After=container-build@%N.service container-volume@%N.service lldap.service grafana-dashboard@prosody.service [Container] +AutoUpdate=local ContainerName=%N EnvironmentFile=%E/coreos-home-server/%N/%N.env +HealthCmd=timeout 5s curl --fail --silent --show-error -o /dev/null localhost:5280/health Image=localhost/%N:latest Network=internal +PodmanArgs=--sdnotify=healthy PublishPort=5222:5222 PublishPort=5223:5223 PublishPort=5269:5269