mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-07-13 09:02:09 -04:00
opencloud_full: add healthchecks for traefik, opencloud and stalwart to the docker compose project
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user