[claude] add production deployment infrastructure (#10) #61
Reference in New Issue
Block a user
Delete Branch "claude/issue-10"
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 #10
Summary
setup-api.sh— one-shot VPS bootstrap: installs Node.js 24, PostgreSQL, Caddy, creates systemd service, provisions database, configures firewall, sets up health check crondeploy.sh— build-and-deploy script: builds esbuild bundle, SCPs to VPS, syncs npm packages, restarts service, verifies healthtimmy-tower.service— systemd unit with hardening (NoNewPrivileges, ProtectSystem, journal logging)Caddyfile— reverse proxy with automatic Let's Encrypt HTTPS, security headers, JSON access logs with rotationhealthcheck.sh— cron-based monitor (every 5 min), auto-restarts after 3 consecutive failureslogrotate.conf— 14-day log rotation with compressionops.sh— addedapi:status,api:logs,api:restart,api:healthcommandsDeployment approach
Option A from the issue: same hermes droplet as the Lightning node. LNbits is localhost, simplest topology.
Acceptance criteria addressed