Repository navigation
Remove retired custom deployment target from Caddy rollout - #119
Conversation
There was a problem hiding this comment.
README.md:41 still documents the deleted target: "Custom-domain reads and writes require SSH access to app@external.simpleanalytics.com", which no longer exists after this PR, so a deployer provisions access to the wrong host. Update that sentence to the remaining SSH target (user@esapp05.simpleanalytics.com, the CADDY_HOST in deploy.mts).
Claude review checkpointReviewed commit |
|
SDLC label: |
* Add Caddy custom-domains deploy destination Add a "caddy" destination alongside "custom" for the new Caddy-based custom-domains setup (elastic-infra ansible/vars/apps/custom-domains.yml). It uploads the same files as the old external nginx server, but rewrites the nginx SSI directives to Caddy template placeholders on upload, since Caddy's templates directive injects the request hostname and the proxy-product query parameters at serve time. The caddy-ssi transform fails the deploy if a build contains stray Go template delimiters or an SSI directive without a known replacement, so a bad build cannot turn into per-request 500s. Uploads go via a temporary file so the transformed bytes are what lands on the server, and the post-upload verification compares against the transformed content. A --caddy-only flag deploys exclusively to the new setup, leaving the CDN and the old external server untouched during the migration. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ApznmYeffWY6YojKXhEJDW * Escape Caddy proxy template values * Remove retired custom deployment target (#119) Co-authored-by: Simple Analytics Codex <codex@simpleanalytics.invalid> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: Simple Analytics Codex <codex@simpleanalytics.invalid> Co-authored-by: simple-analytics-ai[bot] <313929673+simple-analytics-ai[bot]@users.noreply.github.com> Co-authored-by: Adriaan <1079135+adriaandotcom@users.noreply.github.com>
Summary
Closes #118
Removes the retired
customdeployment destination (the nginx server atapp@external.simpleanalytics.com) from the deployment CLI, leavingcdnandcaddyas the only targets. TheDestinationunion,remoteTarget/RemoteTarget,uploadCustomFile, and the custom-server inspection and verification branches are deleted;readCustomFilesbecomesreadCaddyFilesagainstCADDY_HOST/CADDY_ROOT.addServerPaircollapses intoaddCaddyPair, which always applies thecaddy-ssitransform.The destination prompt now offers CDN and Caddy with both selected by default, the proxy variant is offered when Caddy is selected,
--caddy-onlyis unchanged, and the obsolete nginx reminder is replaced by a plain SRI documentation reminder. Caddy keeps consuming the existingdist/**/custom/artifacts, so no generated script or SRI bytes change.This targets PR #95 (
caddy): merge this cleanup into #95 first, then merge #95 intomain.Changes:
Security implications
Has security impact - described as: changes production deployment routing by removing a retired destination and making Caddy a default target. Remote-path validation, shell quoting, Go-template escaping of proxy query values,
--ignore-existingprotection for immutable SRI artifacts, and post-upload content verification are all preserved.Testing
node --test test/deploy.test.mts— 17/17 pass.tsc(projecttsconfig.json,--noEmit) — clean, no errors.Checklist