summaryrefslogtreecommitdiff
path: root/internal/tmpl
AgeCommit message (Collapse)Author
2026-09-02Rate-limit the app process restart instead of hot-loopingHEADmasterClaude
daemon -r restarts immediately with no delay - a genuinely broken deploy (crashes on every start) would hot-loop as fast as the kernel can fork/exec, burning CPU and flooding syslog. -R 5 restarts with a 5s gap instead, matching both Heroku's dyno manager (backs off a repeatedly- crashing dyno rather than hammering it) and dvd.club's own pre-skiff rc.d script, which already used -R 5 before this template replaced it. Verified on the VM: killed the app process directly, confirmed it stayed down through the 1s and 4s marks and was back by 7s - not an immediate restart. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-02Drop unused --old flag from skiff deployClaude
Its only caller was the post-receive hook skiff itself generates, so "hook parity" meant matching a convention we invented and fully control - there's no external contract keeping it around. deploy.Run never read it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-02Add domain and TLS management via skiff domains add/remove/listClaude
Replaces the single server_name string in meta.json with a domain list (one primary, others redirect to it) and TLSDomains tracking what the app's certificate actually covers. Certs are issued/expanded via certbot certonly (webroot, never the --nginx plugin, since Skiff owns and regenerates skiff.d/*.conf itself) as one SAN cert per app, matching how a real multi-domain vhost is normally issued. Domain/TLS changes never touch the jail - no restart, no health check - since they only affect nginx and the certificate. `add` is safe to retry if DNS isn't ready yet; `remove` never calls certbot at all, so it can't fail on an ACME/network problem. Also updates README/USER_GUIDE for the new command surface, one-time TLS host setup (certbot register, renewal cron, reload hook), the --ip same-subnet requirement for jails to reach the network at build time, and the actual base-image provisioning sequence (pkg needs an explicit bootstrap after bsdinstall; versioned port names like go125 need a default symlink) - all found and fixed live while getting this working end-to-end on a real FreeBSD VM. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-25new-app: configure jail mail relay and persist the jail's network aliasClaude
Two provisioning gaps in new-app: - The jail's dma.conf inherited the base image's shared SMARTHOST/ PORT/AUTHPATH, but never got a per-app MAILNAME - without one, dma can misroute mail for recipients on the jail's own apex domain as local delivery. EnableMail appends a MAILNAME of <app>.skiff.local, which can't collide with any real domain an app sends to or from. - A classic jail's ip4.addr is only a bind restriction, not a route, until something aliases it onto a host interface. jail.conf.tmpl never set jail(8)'s own `interface` parameter, so nothing ever created that alias - confirmed on skiff-freebsd, where the address had twice been made to work via an ad hoc `ifconfig alias` that didn't survive a reboot. Setting `interface` lets jail(8) manage the alias itself, including on every boot.
2026-08-06Add skiff config set/unset/list, backed by /app/env in the app's datasetClaude
Config vars are plain env vars, injected into both the running app (via rc.d) and the release phase, and versioned on the same ZFS snapshot timeline as deploys - a bad config change gets the same automatic snapshot/restart/health-check/rollback guarantee a bad deploy already gets. Extracts deploy.go's health check into internal/health so both paths share it. Verified end-to-end against a FreeBSD VM: config set/unset, automatic rollback on a health-check failure, and explicit `skiff rollback` all correctly carry the env file along with the rest of the dataset.
2026-08-05Initial commit of skiff scaffoldingClaude