(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.
This commit is contained in:
Chirag Aggarwal committed 2026-07-02 10:54:55 +05:30
1 parent f5c9be706d
commit a94d820e70
1 file changed
+3 -2
+3 -2
View File
@@ -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: