Skip to content

scarver2/kamalduo

Repository files navigation

This repo demonstrates deploying a Sinatra Rack application using Kamal 2. Instructions are included how to deploy to popular VPSes.

Prerequisites

Install Kamal 2 gem globally.

gem install kamal

Instructions

Install the application's RubyGem dependecies.

bundle install

Set the environment variables for your project using the .env.template file. Use bin/kamal to access all Kamal commands using the environment variables.

A .env.local file is provided to test Docker, Kamal, and the Sinatra Rack application locally.

Recommendation

It is recommended you add a kamalduo.local entry to your local /etc/hosts file to test locally:

grep -qE '^\s*127\.0\.0\.1\s+kamalduo\.local$' /etc/hosts \
  || echo '127.0.0.1  kamalduo.local' | sudo tee -a /etc/hosts > /dev/null

The Kamal Advantage

Health Check

KamalDuo demonstrates a health check endpoint at /healthz that Kamal will use to verify the application is running.

curl -i http://localhost:9292/healthz

Documentation

📦docs
┣ 📂devops
┃ ┗ GitHub Actions
┣ 📂hosting
┃ ┣ Digital Ocean
┃ ┣ Hetzner
┃ ┣ Vultr
┣ 📂secrets
┃ ┗ 📜Bitwarden
┣ 📜Docker
┣ 📜Kamal
┗ 📜NGINX

Developed using Kamal 2.10.1.

Credits

@2026 Stan Carver II, A1 Web Consulting

About

This repo demonstrates using Kamal 2 to deploy a Sinatra Rack application. VPS instructions included.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors