From a94d820e70d29ddc75bbeb0bb0b2b2d1aa87ed57 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Thu, 2 Jul 2026 10:54:55 +0530 Subject: [PATCH] (fix): replace doctor healthcheck with HTTP health endpoint check The doctor CLI task sends a real 'Test SMTP Connection' email to demo@example.com as part of its SMTP check. Since 33ce469ab0 made doctor the Docker healthcheck (interval: 5s), every self-hosted instance with SMTP configured has been sending that email up to every 5 seconds for the lifetime of the container. Use a curl against the public, side-effect-free /v1/health/version endpoint instead. The Host header is set from _APP_DOMAIN because router protection (enabled by default) rejects unknown hostnames, which would leave instances with real domains permanently unhealthy. start_period gives boot and migrations headroom while compose up --wait still unblocks on the first passing check. --- docker-compose.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index fb8f6d7e9e..59f9290607 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -43,11 +43,12 @@ services: image: ${_APP_IMAGE:-appwrite/appwrite}:${_APP_VERSION:-latest} healthcheck: test: - - CMD - - doctor + - CMD-SHELL + - 'curl -fsS -o /dev/null -H "Host: $${_APP_DOMAIN:-localhost}" http://localhost/v1/health/version' interval: 5s timeout: 5s retries: 12 + start_period: 120s networks: - appwrite labels: