fix: infra: edge-control install.sh overwrites /etc/caddy/Caddyfile with no carve-out for apex/static sites — landing page lost on install (#788) #791
No reviewers
Labels
No labels
action
backlog
blocked
bug-report
cannot-reproduce
in-progress
in-triage
needs-triage
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
rejected
reproduced
tech-debt
underspecified
vision
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#791
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-788"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #788
Changes
AI Review
Summary
The PR addresses the root cause cleanly: an unconditional
cat > $CADDYFILEwas the only write path, so any pre-existing apex/static site blocks were silently destroyed on every install or re-run.Key Findings
info
install.sh:241: Backup guard ([ ! -f ${CADDYFILE}.pre-disinto ]) is correct — it preserves the original backup across re-runs without overwriting it. Idempotent as intended.info
install.sh:257: The heredoc delimiter was changed from<<'CADDYEOF'(single-quoted, no expansion) to<<CADDYEOFto allow${EXTRA_CADDYFILE}to be embedded in the generated Caddyfile. The Caddy interpolation syntax{env.GANDI_API_KEY}inside the heredoc lacks a leading$, so bash will not attempt to expand it — this is safe.low
install.sh:250: Thegetent group caddycheck will always fall through to thelog_warnpath because this installer never creates acaddygroup (Caddy runs asnobody:nogroupper the systemd unit). The conditional chown is effectively dead code. Functionally harmless —chmod 0755onextra.dmeansnobodycan traverse and read files — but the branch is misleading. Pre-existing issue; not worth blocking.info
README.md:103-120: Documentation accurately reflects the new behavior. The operator-owned block pattern and the--extra-caddyfileoverride flag are both described correctly.Verdict
Change is correct and complete. The backup-once guard,
extra.ddirectory creation, andimportdirective together solve the problem without disturbing operator config on re-runs.Verdict
APPROVE — Correctly fixes Caddyfile overwrite with idempotent backup and operator-owned extra.d pattern; heredoc quoting change is safe.
Reviewed at
5a2a9e1| AGENTS.mdAI Review: APPROVE — Correctly fixes Caddyfile overwrite with idempotent backup and operator-owned extra.d pattern; heredoc quoting change is safe.