rails template for kubernetes deployment
- Rails 7.x (w/tailwind)
- Ruby 3.x
To generate a Rails application using this template, pass the -m
option to rails new
, like this:
$ rails new project -T -d postgresql --css tailwind \
-m https://raw.githubusercontent.com/astrocket/rails-template/master/template.rb
- Kubernetes & Docker for production deploy
- Tailwind & Stimulus by importmaps
- ActiveJob, Sidekiq, Redis setting for background job
- ActiveAdmin + ArcticAdmin for application admin
- Rspec + FactoryBot setting for test code
Procfile based applications
with foreman start
It runs
- rails
- tailwind
- sidekiq
Stimulus specific generator task.
with rails g stimulus posts index
It generates
app/javascript/posts/index_controller.js
with sample html markup containing stimulus path helper.
With kubernetes you can manage multiple containers with simple yaml
files.
Template contains
- deployment guide for DigitalOcean's cluster from scratch
- Let's Encrypt issuer and Ingress configuration
- demo deployment yaml to instantly run sample hashicorp/http-echo + nginx app
- basic puma, nginx and sidekiq deployment setup
Run test specs
bundle exec rspec