Junior Track Roadmap

Deployment: Kamal 2 basics

This course walks through one Rails app's config/deploy.yml for Kamal 2, a command-line tool that deploys an app as a Docker container. It covers the servers, ssh and registry blocks, clear and secret environment variables, and running Solid Queue inside Puma. It explains kamal-proxy, automatic HTTPS with Let's Encrypt and the /up healthcheck that gates each deploy. It then covers persistent volumes, a self-managed Postgres accessory, command aliases, and a full kamal deploy traced from build to traffic swap.

What you'll learn

  • ✓How deploy.yml uses ERB and environment variables for servers, SSH and the registry
  • ✓How secret names in deploy.yml resolve from .kamal/secrets at deploy time
  • ✓Running the Solid Queue supervisor inside Puma with SOLID_QUEUE_IN_PUMA
  • ✓How kamal-proxy handles HTTPS and gates deploys with the /up healthcheck
  • ✓Keeping uploads and Postgres data across deploys with volumes and a db accessory
  • ✓Using aliases such as kamal console and kamal logs
Free preview · Lesson 1 3 min read

What Kamal 2 automates

Open this app's Gemfile and one line, with a comment above it, names what this course is about:

Read the full lesson free →

Curriculum

7 lessons
Type to start searching...