ops: static design preview on dev-02 #780

Closed
kayg wants to merge 0 commits from ops/preview-dev02 into dev
Owner

Rebuilds the design preview on cua@calternal-dev-02-std, since 8by64-compute01 is gone.

  • scripts/preview-deploy.sh <branch> [name]: builds the branch's mockup in the Nix shell (via slot, Vite --base=/<name>/, plus a prefix fix for runtime strings like /attachments/...), copies the live release to ~/preview/releases/<ts>, replaces /<name>/, regenerates review.html (branch, commit, dates for every mockup), swaps the ~/preview/site symlink atomically, keeps 8 releases. A flock serializes deploys.
  • scripts/preview/Caddyfile + calternal-preview.service: Caddy (nixpkgs) as a systemd --user unit, bound to loopback and the NetBird address only.
  • Decision: port 80, not a high port. NetBird ACLs on dev-02 only pass tcp 22/22022/80/443 from peers, so a custom port was unreachable from the control host. Needed net.ipv4.ip_unprivileged_port_start=80 in /etc/sysctl.d/60-preview-port80.conf.
  • Until the Nix shell is on dev, the script borrows flake.nix/flake.lock from origin/infra/nix-devshell into the build worktree (not committed).
  • Live: http://calternal-dev-02-std.vpn.kayg.org/ (redirects to review.html); first entry review/calendar-month @ 917dbfa1. review/calendar-2 not deployed.

Deploy on dev-02: cd ~/Developer/Worktrees/preview-dev02 && scripts/preview-deploy.sh review/<x> [name] (detach with systemd-run --user).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xi6YxsuZ7m2ESGC7aS91AN

Rebuilds the design preview on `cua@calternal-dev-02-std`, since 8by64-compute01 is gone. - `scripts/preview-deploy.sh <branch> [name]`: builds the branch's mockup in the Nix shell (via `slot`, Vite `--base=/<name>/`, plus a prefix fix for runtime strings like `/attachments/...`), copies the live release to `~/preview/releases/<ts>`, replaces `/<name>/`, regenerates `review.html` (branch, commit, dates for every mockup), swaps the `~/preview/site` symlink atomically, keeps 8 releases. A flock serializes deploys. - `scripts/preview/Caddyfile` + `calternal-preview.service`: Caddy (nixpkgs) as a `systemd --user` unit, bound to loopback and the NetBird address only. - Decision: port 80, not a high port. NetBird ACLs on dev-02 only pass tcp 22/22022/80/443 from peers, so a custom port was unreachable from the control host. Needed `net.ipv4.ip_unprivileged_port_start=80` in `/etc/sysctl.d/60-preview-port80.conf`. - Until the Nix shell is on dev, the script borrows `flake.nix`/`flake.lock` from `origin/infra/nix-devshell` into the build worktree (not committed). - Live: http://calternal-dev-02-std.vpn.kayg.org/ (redirects to review.html); first entry `review/calendar-month` @ 917dbfa1. `review/calendar-2` not deployed. Deploy on dev-02: `cd ~/Developer/Worktrees/preview-dev02 && scripts/preview-deploy.sh review/<x> [name]` (detach with `systemd-run --user`). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Xi6YxsuZ7m2ESGC7aS91AN
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xi6YxsuZ7m2ESGC7aS91AN
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xi6YxsuZ7m2ESGC7aS91AN
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xi6YxsuZ7m2ESGC7aS91AN
preview: serve on port 80 (NetBird ACL allows only 80/443), / redirects to review.html
Some checks failed
CI / server (pull_request) Has been cancelled
CI / rust (pull_request) Has been cancelled
CI / web (pull_request) Has been cancelled
8943863489
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xi6YxsuZ7m2ESGC7aS91AN
Author
Owner

Closing: head 89438634 is already in dev (reached via 223fd249); nothing left to merge. Branch kept.

Closing: head 89438634 is already in dev (reached via 223fd249); nothing left to merge. Branch kept.
kayg closed this pull request 2026-11-04 13:04:40 +00:00
Some checks failed
CI / server (pull_request) Has been cancelled
CI / rust (pull_request) Has been cancelled
CI / web (pull_request) Has been cancelled

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal!780
No description provided.