Skip to content

Rails generator to quickly spin up a Rails 8 app ready to be self-hosted. Sensible defaults thought for quick iteration: DaisyUI, Signoz, Plausible, Sentry, Mailjet, Clearance, Omniauth, Bun among others.

License

Notifications You must be signed in to change notification settings

sgerov/railsmaker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

83 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Gem Version Support Live Demo Live Demo Repo Guide DaisyUI Templates

πŸ“¦ Railsmaker

Ship your MVP in hours, not weeks β€’ Zero config needed β€’ Save 20+ dev hours

⚑ Why Railsmaker?

  • Ship Faster: From zero to production in 15 minutes
  • Growth Ready: Built-in analytics, SEO, and monitoring
  • Own Your Data: Fully self-hosted, full control, full flexibility
  • Cost Efficient: You decide how much you want to spend
  • DX Focused: Modern stack, zero configuration

✨ Features

Growth & Analytics

  • Privacy-focused: Self-hosted Plausible, Signoz, and Docker Registry
  • SEO: Auto-optimized meta-tags & sitemaps
  • Performance: Lightning-fast ~50ms page loads
  • Mobile First: Instant responsive layouts

Developer Experience

  • UI: Latest TailwindCSS 4 + DaisyUI 5
  • Auth: Battle-tested Clearance + OmniAuth
  • Storage: SQLite + Litestream
  • Email: Production-ready Mailjet integration
  • Modern Stack: Rails 8, Ruby 3.2, Hotwire magic

Infrastructure

  • Monitoring: Full SigNoz & Sentry integration
  • Deploy: One-command Kamal deployments, self-hosted Registry support
  • Observability: Enterprise-grade OpenTelemetry + Lograge
  • Scale-ready: Global CDN support, multi-environment

πŸš€ Setup

Prerequisites

  • Ruby 3.x (rbenv or rvm recommended)
  • Bundler: gem install bundler
  • Bun: Install guide
  • Git
  • Dev tools:
    • Ubuntu/Debian: sudo apt install build-essential libyaml-dev
    • macOS: xcode-select --install
  • Docker (for analytics & monitoring)

1. Bootstrapping your app

A. Set Required Environment Variables

# Docker registry access (required)
export KAMAL_REGISTRY_PASSWORD="docker-registry-password"

# Litestream backup configuration (optional)
export LITESTREAM_ACCESS_KEY_ID="access-key"
export LITESTREAM_SECRET_ACCESS_KEY="secret-access-key"
export LITESTREAM_BUCKET="https://eu2.yourbucketendpoint.com/"
export LITESTREAM_REGION="eu2"

B. Install and Deploy

gem install railsmaker-core

# Interactive wizard (2 minutes)
railsmaker new:wizard

# Deploy to any cloud
kamal setup

If you have chosen to include litestream keep in mind that the corresponding kamal accessory will also be deployed.

2. Setting up Monitoring (Optional)

A. Install SigNoz Server

railsmaker remote signoz \
  --ssh-host=monitor.example.com \
  --ssh-user=deploy

B. Add OpenTelemetry Collector to apps server

railsmaker remote signoz:opentelemetry \
  --ssh-host=app.example.com \
  --ssh-user=deploy \
  --signoz-host=monitor.example.com \
  --hostname=my-production-apps

3. Setting up Analytics (Optional)

railsmaker remote plausible \
  --ssh-host=analytics.example.com \
  --ssh-user=deploy \
  --analytics-host=plausible.example.com

4. Setting up Private Docker Registry (Optional)

railsmaker remote registry \
  --ssh-host=192.168.1.10 \
  --ssh-user=deploy \
  --registry-host=registry.example.com \
  --registry-username=admin \
  --registry-password=secret

After setting up your registry:

  1. Create an A record for registry.example.com pointing to your server
  2. Update your Kamal config to use your private registry (unless you already used -r option):
# config/deploy.yml
registry:
  server: registry.example.com
  username: admin
  password:
    - KAMAL_REGISTRY_PASSWORD

Verification

  • SigNoz Dashboard: https://monitor.example.com:3301
  • Plausible Analytics: https://analytics.example.com
  • Docker Registry: https://registry.example.com
  • Your App: https://app.example.com

Note: All services are tested on Ubuntu 24.04 and macOS 15.2.

For a more detailed guide, check out 10 Steps To Prod.

Environment Requirements

  • SigNoz Server: 2 CPU, 4GB RAM minimum
  • Plausible: 1 CPU, 2GB RAM minimum
  • App Server: 1 CPU, 2GB RAM minimum

You can decide how to split the services between your servers (e.g. SigNoz & Plausible on a separate server from the app or apps).

Database Recovery

In case of DB failure, follow these steps to recover your data:

  1. Stop the application:
kamal app stop
  1. Remove existing database files:
kamal app exec /bin/sh -i
rm -rf ./storage/*
exit
  1. Recover files and set proper ownership to files:
kamal restore-db-app
kamal restore-db-cache
kamal restore-db-queue
kamal restore-db-cable
kamal restore-db-ownership
  1. Restart Litestream to initiate recovery:
kamal accessory reboot litestream
  1. Start the application:
kamal app boot

Managing Docker Services

After deploying services with railsmaker remote commands, you can manage them using standard Docker commands:

# Navigate to the service directory
cd ~/SERVICE_DIRECTORY

# Common commands for all services
docker compose ps          # List containers
docker compose logs -f     # View logs
docker compose restart     # Restart all containers
docker compose down        # Stop all containers
docker compose up -d       # Start all containers

Service directories:

  • Plausible Analytics: ~/plausible-ce
  • SigNoz Server: ~/signoz/deploy/docker
  • SigNoz Server Collector: ~/signoz/deploy/docker/generator/infra
  • OpenTelemetry Collector (other servers): ~/signoz-opentelemetry/deploy/docker/generator/infra

Note: Replace ~ with the absolute path if using sudo or running commands as another user.

Cloudflare DNS

If you are relying on Cloudflare, make sure you set-up SSL/TLS to Full for your application and analytics.

Support

This project is pay-what-you-want. If it helps you ship faster:

Support

Give it a try at railsmaker.com

About

Rails generator to quickly spin up a Rails 8 app ready to be self-hosted. Sensible defaults thought for quick iteration: DaisyUI, Signoz, Plausible, Sentry, Mailjet, Clearance, Omniauth, Bun among others.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published