prosody: Start on health-check pass

This commit is contained in:
Alex Palaistras 2023-11-17 12:59:37 +00:00
parent 80ad429457
commit 263149c324
3 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,6 @@
FROM docker.io/debian:bookworm-slim FROM docker.io/debian:bookworm-slim
ARG VERSION=0.12.4 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 \ RUN apt-get update -y && apt-get install -y --no-install-recommends \
curl mercurial gnupg ca-certificates apt-transport-https curl mercurial gnupg ca-certificates apt-transport-https

View File

@ -70,6 +70,7 @@ modules_enabled = {
-- HTTP modules -- HTTP modules
"websocket"; -- XMPP over WebSockets "websocket"; -- XMPP over WebSockets
"http_openmetrics"; -- Enables metrics collection in OpenMetrics-compatible format. "http_openmetrics"; -- Enables metrics collection in OpenMetrics-compatible format.
"http_health"; -- Enabled health-checks over HTTP.
-- Other specific functionality -- Other specific functionality
"conversejs"; -- Web-based frontend for XMPP "conversejs"; -- Web-based frontend for XMPP

View File

@ -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 After=container-build@%N.service container-volume@%N.service lldap.service grafana-dashboard@prosody.service
[Container] [Container]
AutoUpdate=local
ContainerName=%N ContainerName=%N
EnvironmentFile=%E/coreos-home-server/%N/%N.env 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 Image=localhost/%N:latest
Network=internal Network=internal
PodmanArgs=--sdnotify=healthy
PublishPort=5222:5222 PublishPort=5222:5222
PublishPort=5223:5223 PublishPort=5223:5223
PublishPort=5269:5269 PublishPort=5269:5269