This guide walks you through deploying a Rails app to DigitalOcean using Kamal.


📂 Key Files


🔑 Setting Up Secrets

In your secrets file:

Variable Description
KAMAL_REGISTRY_PASSWORD Your Docker Hub personal access token (generate it in Docker Hub settings).
RAILS_MASTER_KEY Found in config/master.key in your Rails app. This is required to decrypt Rails credentials.

Example:

bash
CopyEdit
# From your password manager — never commit this!
KAMAL_REGISTRY_PASSWORD=your_dockerhub_token
RAILS_MASTER_KEY=your_master_key

⚠️ Security Tips:


⚙️ Configuring deploy.yml

1. Service Name

Set this to your app name:

yaml
CopyEdit
service: twitterclone