Skip to content

Enable configuring the health check from install.#159

Closed
naturedamends wants to merge 1 commit intoDokploy:mainfrom
naturedamends:feature/install-health
Closed

Enable configuring the health check from install.#159
naturedamends wants to merge 1 commit intoDokploy:mainfrom
naturedamends:feature/install-health

Conversation

@naturedamends
Copy link
Copy Markdown

@naturedamends naturedamends commented Apr 22, 2026

I am trying to reduce idle CPU usage. Dokpoly is using 2 percent ish on my low powered device.

I'm not bothered about delth checks

this allows keeping them, turning them off, and configuring the values

HEALTH_CMD=none sh install.sh`

Greptile Summary

This PR adds HEALTH_CMD, HEALTH_INTERVAL, HEALTH_TIMEOUT, HEALTH_RETRIES, and HEALTH_START_PERIOD environment-variable overrides for the Traefik container's health check, and correctly handles HEALTH_CMD=none via Docker's --no-healthcheck flag. The HEALTH_CMD=none fix from the previous review round is now properly implemented.

Two unresolved concerns carry over: the word-splitting bug when health-check values contain spaces (e.g. HEALTH_CMD=\"curl -f http://localhost/\" — single-quotes embedded in an unquoted variable expansion are treated literally, not as shell quoting) and the new finding that combining HEALTH_CMD=none with any of the interval/timeout/retries/start-period variables passes both --no-healthcheck and a --health-* flag to Docker, which Docker rejects outright.

Confidence Score: 4/5

Not ready to merge — an existing P1 word-splitting bug is unresolved and a new edge-case conflict can prevent Traefik from starting.

The HEALTH_CMD=none fix is now correct. However, the P1 word-splitting issue flagged in the previous review round remains unaddressed (single-quoted values inside an unquoted $HEALTH_EXTRA_OPTS are not protected from word splitting, so multi-word health-cmd values are mis-parsed). Additionally, a new bug exists where combining HEALTH_CMD=none with any of the interval/timeout/retries/start-period variables produces a docker command Docker refuses to execute.

apps/website/public/install.sh — specifically the HEALTH_EXTRA_OPTS construction and its unquoted expansion in the docker run call.

Comments Outside Diff (1)

  1. apps/website/public/install.sh, line 292-306 (link)

    P2 Health-check options are only applied to the Traefik container

    The docker service create block for the main dokploy service (lines 272–288) does not receive any of the new HEALTH_* variables. If the motivation is reducing idle CPU caused by health probes, the dokploy service is also a candidate. This may be intentional, but it is worth documenting or extending the feature to be consistent.

Reviews (2): Last reviewed commit: "Fix as per AI, plus add sh compatibility..." | Re-trigger Greptile

Comment thread apps/website/public/install.sh Outdated
Comment thread apps/website/public/install.sh Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant