opencloud_full: add healthchecks for traefik, opencloud and stalwart to the docker compose project

This commit is contained in:
Pascal Bleser
2026-06-18 15:47:51 +02:00
parent 6364dda354
commit 276edc2fca
3 changed files with 22 additions and 1 deletions

View File

@@ -37,6 +37,8 @@ services:
- "--accessLog.format=json"
- "--accessLog.fields.headers.names.X-Request-Id=keep"
- "--accessLog.fields.headers.names.Trace-Id=keep"
# enable the ping endpoint for monitoring
- "--ping=true"
ports:
- "80:80"
- "443:443"
@@ -55,6 +57,12 @@ services:
logging:
driver: ${LOG_DRIVER:-local}
restart: always
healthcheck:
test: ["CMD", "traefik", "healthcheck", "--ping=true"]
interval: 10s
retries: 5
start_period: 3s
timeout: 3s
volumes:
certs:

View File

@@ -21,7 +21,7 @@ services:
# enable services that are not started automatically
OC_ADD_RUN_SERVICES: ${START_ADDITIONAL_SERVICES}
OC_URL: https://${OC_DOMAIN:-cloud.opencloud.test}
OC_LOG_LEVEL: ${LOG_LEVEL:-info}
OC_LOG_LEVEL: "${LOG_LEVEL:-info}"
OC_LOG_COLOR: "${LOG_PRETTY:-false}"
OC_LOG_PRETTY: "${LOG_PRETTY:-false}"
# do not use SSL between Traefik and OpenCloud
@@ -88,6 +88,12 @@ services:
logging:
driver: ${LOG_DRIVER:-local}
restart: always
healthcheck:
test: ["CMD-SHELL", "test $(curl -sSf http://localhost:9104/healthz) == 'OK'"]
interval: 10s
retries: 5
start_period: 3s
timeout: 3s
opencloud-certs:
image: alpine/openssl:latest

View File

@@ -48,6 +48,13 @@ services:
echo "Starting Stalwart in production mode"
exec /usr/local/bin/stalwart --config /etc/stalwart/config.json
healthcheck:
test: ["CMD-SHELL", "curl -LsSf http://localhost:8080/healthz/live|grep -q '\"status\":200'"]
interval: 10s
retries: 5
start_period: 3s
timeout: 3s
stalwart-import:
image: stalwart-cli:latest
build: