trilium/apps/server/scripts
Elian Doran a05d1e9518
chore(healthcheck): probe every minute, and declare the real timeout
The Dockerfiles set only --start-period, so the interval and timeout came
from Docker's defaults. The 30s interval spends 2880 cold node processes a
day on machines that are otherwise idle, and the 30s timeout was dead
config: probeHealth() caps itself at 2s, so Docker's own timer could never
fire. Vaultwarden, Outline and Uptime Kuma all settled on 60s; the projects
still at 30s got there by inheriting the default rather than choosing it.

--start-period goes to 30s so a first boot that creates the schema, runs a
migration or checks consistency is not reported unhealthy, and so the CI
step that waits 50s for a healthy container keeps its slack now that a
missed probe retries a minute later instead of 30s later. A successful
probe ends the window immediately, so a normal boot pays none of it.

Worst case time to unhealthy moves from ~100s to ~210s. Nothing acts on
that signal on its own, so the cost is a human reading docker ps later.

assertHealthcheckStaysSmall() justifies its bundle ceiling with the probe's
cadence, so its comment moves to 60 seconds too.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-23 18:03:15 +03:00
..
build-server.sh chore(server): fix dist creation 2026-04-09 22:31:50 +03:00
build.ts chore(healthcheck): probe every minute, and declare the real timeout 2026-08-23 18:03:15 +03:00
export-schema.sh chore(regroup): adapt export-schema script 2025-12-06 10:29:08 +02:00
generate_document.ts feat(server): remove cls wrapper 2026-05-27 21:34:14 +03:00
generate-cert.sh chore(regroup): clean bin dir 2025-12-06 10:50:42 +02:00