diff --git a/devtools/deployments/opencloud_full/docker-compose.yml b/devtools/deployments/opencloud_full/docker-compose.yml index b8f07ec43e..01924edb57 100644 --- a/devtools/deployments/opencloud_full/docker-compose.yml +++ b/devtools/deployments/opencloud_full/docker-compose.yml @@ -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: diff --git a/devtools/deployments/opencloud_full/opencloud.yml b/devtools/deployments/opencloud_full/opencloud.yml index 9a85633608..c328342ec0 100644 --- a/devtools/deployments/opencloud_full/opencloud.yml +++ b/devtools/deployments/opencloud_full/opencloud.yml @@ -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 diff --git a/devtools/deployments/opencloud_full/stalwart.yml b/devtools/deployments/opencloud_full/stalwart.yml index 58e3f7b284..fc50d860b6 100644 --- a/devtools/deployments/opencloud_full/stalwart.yml +++ b/devtools/deployments/opencloud_full/stalwart.yml @@ -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: