Fixed
Slow-startup apps (GitLab, Nextcloud, Mastodon, …) auto-rolled-back every cron tick
The health-check timeout was 5 minutes, and a container still in state=running, health=starting after that was treated as failure → automatic rollback. GitLab routinely needs 8-15 minutes for first-boot migrations and Rails warm-up. Result: the user got a "Health check failed — rolled back" notification every evening and GitLab never actually updated.
Three changes to the wait logic:
- Default wait raised 300s → 600s (
HEALTHCHECK_MAX_STARTINGenv var, configurable). - Respect the image's own
Healthcheck.StartPeriod— the effective wait ismax(default, start_period × 1.5). An image declaringstart_period: 5mno longer gets cut off after our default. state=running AND health=startingafter the wait → no rollback. Container is alive but slow; Docker's own healthcheck keeps running and will eventually flip the bit. Reported as a soft success (⚠ updated but still 'starting' — left running) so the rest of the batch continues.
Active unhealthy or not-running still rolls back as before (standalone path) — only the over-eager "still starting → failure" verdict is gone.
Compose-path "rolled back" messages were misleading
For compose containers the previous "rollback" was a no-op (the same compose file produces the same container). The message now says container left in place (compose) honestly instead of claiming a rollback that didn't happen.
Added
Last 10 log lines attached to health-check notifications
When a container is rolled back or reports as "still starting", the Telegram / Discord / webhook message now includes a code-fenced tail of its logs — so you can see in chat what was happening without SSH-ing to the host:
⚠ gitlab: Updated but still 'starting' after our wait — left running.
Last logs:
2026-05-27 19:01:23 ==> /var/log/gitlab/rails/application.log <==
2026-05-27 19:01:25 Running database migrations...
HEALTHCHECK_MAX_STARTING env var (default 600s)
For users with super-slow apps that need an even longer ceiling. Persisted via settings.json (advanced setting).
docker pull amayer1983/docksentry:latest
docker compose up -d