https://github.com/scarver2/kamalduo
This repo demonstrates using Kamal 2 to deploy a Sinatra Rack application. VPS instructions included.
https://github.com/scarver2/kamalduo
docker docker-compose kamal kamal2 ruby sinantra
Last synced: 5 months ago
JSON representation
This repo demonstrates using Kamal 2 to deploy a Sinatra Rack application. VPS instructions included.
- Host: GitHub
- URL: https://github.com/scarver2/kamalduo
- Owner: scarver2
- License: mit
- Created: 2025-12-29T14:59:45.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2026-01-10T00:44:16.000Z (6 months ago)
- Last Synced: 2026-01-10T20:10:17.139Z (6 months ago)
- Topics: docker, docker-compose, kamal, kamal2, ruby, sinantra
- Language: Ruby
- Homepage:
- Size: 35.2 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# [Sinatra Kamal Duo](https://github.com/scarver2/kamalduo)
This repo demonstrates deploying a [Sinatra Rack application](https://sinatrarb.com) using [Kamal 2](https://kamal-deploy.org). Instructions are included how to deploy to popular VPSes.
## Prerequisites
Install Kamal 2 gem globally.
```bash
gem install kamal
```
## Instructions
Install the application's RubyGem dependecies.
```bash
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:
```bash
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.
```bash
curl -i http://localhost:9292/healthz
```
## Documentation
📦[docs](docs)
┣ 📂[devops](docs/devops)
┃ ┗ [GitHub Actions](docs/devops/github_actions.md)
┣ 📂[hosting](docs/hosting)
┃ ┣ [Digital Ocean](docs/devops/digital_ocean.md)
┃ ┣ [Hetzner](docs/devops/hetzner.md)
┃ ┣ [Vultr](docs/devops/vultr.md)
┣ 📂[secrets](docs/secrets)
┃ ┗ 📜[Bitwarden](docs/secrets/bitwarden.md)
┣ 📜[Docker](docs/docker.md)
┣ 📜[Kamal](docs/kamal.md)
┗ 📜[NGINX](docs/hosting/nginx.md)
Developed using [Kamal 2.10.1](https://github.com/basecamp/kamal/releases/tag/v2.10.1).
## Credits
@2026 [Stan Carver II](http://stancarver.com), [A1 Web Consulting](https://a1webconsulting.com)