How to setup Kamal?

less than 1 minute read

Installation

gem install kamal

Initialization

kamal init

The above command will create 2 files

  1. .env
  2. config/deploy.yml

Configuration

.env

KAMAL_REGISTRY_PASSWORD=""
RAILS_MASTER_KEY=""

config/deploy.yml

service: <SERVICE_NAME>
image: <REGISTRY_USERNAME>/<IMAGE_NAME>
servers:
  - 192.168.0.1
  - 192.168.0.2
registry:
  username: <REGISTRY_USERNAME>
  password:
    - KAMAL_REGISTRY_PASSWORD
env:
  secret:
    - RAILS_MASTER_KEY