Ruby Flow0 Hot19 phút
Deploying Rails 8 with Kamal on a Single Server
A practical guide to deploying a Rails 8 app on a single VPS using Kamal 2. Covers server hardening (Ubuntu 24.04, UFW, fail2ban, SSH key-only auth), Docker installation, configuring host Postgres and Redis to listen on the Docker bridge, a complete config/deploy.yml with kamal-proxy SSL via Let's Encrypt, container registry options (GHCR recommended), zero-downtime deploy mechanics, database migration strategies (entrypoint vs. Kamal hooks), nightly pg_dump backups, and common pitfalls like Docker bypassing UFW and architecture mismatches on Apple Silicon.