Crash-loop protection
When the Caddy process exits, Caddy.Server.Embedded dies and the supervisor restarts it (restart: :permanent). A persistently failing start (e.g. port 443 already in use) hits max restart intensity and takes down the whole Caddy.Supervisor — including Caddy.ConfigProvider, losing in-memory configuration.
Options:
- Restart backoff, or
- Transition to a held error state (align with the
Caddy.State machine) instead of crashing repeatedly
Binary version detection
No caddy version detection or minimum-version check exists. Custom builds (xcaddy) with missing modules produce confusing adapt failures.
Proposal:
Caddy.version/0 → {:ok, %{version: "2.8.4", modules: [...]}} (via caddy version / caddy list-modules)
- Startup compatibility check with a clear log message when the binary is too old or missing required modules
Crash-loop protection
When the Caddy process exits,
Caddy.Server.Embeddeddies and the supervisor restarts it (restart: :permanent). A persistently failing start (e.g. port 443 already in use) hits max restart intensity and takes down the wholeCaddy.Supervisor— includingCaddy.ConfigProvider, losing in-memory configuration.Options:
Caddy.Statemachine) instead of crashing repeatedlyBinary version detection
No
caddy versiondetection or minimum-version check exists. Custom builds (xcaddy) with missing modules produce confusingadaptfailures.Proposal:
Caddy.version/0→{:ok, %{version: "2.8.4", modules: [...]}}(viacaddy version/caddy list-modules)