mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
(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:
1 file changed
+3
-2
+3
-2
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user