[M-18] Ops gaps: no healthchecks, depends_on without condition, no resource limits, layer order busts deps.compile, Caddy logs unpersisted, no backups #30

Closed
opened 2026-11-14 18:28:55 +01:00 by amiryahaya · 1 comment
Owner

Finding

No HEALTHCHECK / healthcheck blocks (Caddy proxies before the app is up; wedged app never restarted); no mem limits; Dockerfile copies lib/priv/assets before mix deps.compile (every source change recompiles deps); Caddy access logs write to an unpersisted volume; no :mnesia.backup story — a corrupt directory crash-loops the release with no runbook.

Evidence

  • Dockerfile:38-42 vs :58; docker-compose.yml:52-53; Caddyfile:14-19; lib/mdid_ws/application.ex:43-60

Impact

Fragile deployments; slow builds; lost logs; unrecoverable-from-corruption store.

Fix

  • Add a /healthz endpoint + healthcheck + depends_on: condition: service_healthy
  • Standard layer ordering (mix.exs/lock → deps → sources)
  • Resource limits in compose; persist or ship Caddy logs; scheduled mnesia backup + restore runbook

Line numbers refer to the initial import commit 282cb11. Source: comprehensive audit, 2026-11-12 (first review of this codebase).

## Finding No HEALTHCHECK / healthcheck blocks (Caddy proxies before the app is up; wedged app never restarted); no mem limits; Dockerfile copies lib/priv/assets before `mix deps.compile` (every source change recompiles deps); Caddy access logs write to an unpersisted volume; no `:mnesia.backup` story — a corrupt directory crash-loops the release with no runbook. ## Evidence - `Dockerfile:38-42` vs `:58`; `docker-compose.yml:52-53`; `Caddyfile:14-19`; `lib/mdid_ws/application.ex:43-60` ## Impact Fragile deployments; slow builds; lost logs; unrecoverable-from-corruption store. ## Fix - [ ] Add a /healthz endpoint + healthcheck + `depends_on: condition: service_healthy` - [ ] Standard layer ordering (mix.exs/lock → deps → sources) - [ ] Resource limits in compose; persist or ship Caddy logs; scheduled mnesia backup + restore runbook _Line numbers refer to the initial import commit `282cb11`. Source: comprehensive audit, 2026-11-12 (first review of this codebase)._
Author
Owner

Verified fixed on main (1b6216b): /healthz, healthcheck + service_healthy, mem limits, persisted Caddy logs, backup script and runbook (B2).

Verified fixed on main (1b6216b): /healthz, healthcheck + service_healthy, mem limits, persisted Caddy logs, backup script and runbook (B2).
Sign in to join this conversation.
No description provided.