Documentation

Deploy a Ruby app

Deploy Ruby on Rails, Sinatra or any Rack app, plus Sidekiq workers, on Rebasable.

Rebasable detects Ruby from a Gemfile. It installs gems with Bundler (using your Gemfile.lock) and the Ruby version from .ruby-version or the ruby line of the Gemfile.

Rails

Setting Value
Build command bundle install && bundle exec rails assets:precompile
Pre-deploy command bundle exec rails db:migrate
Start command bundle exec puma -C config/puma.rb

Environment variables to set:

RAILS_ENV=production
RAILS_MASTER_KEY=...        # from config/master.key
RAILS_LOG_TO_STDOUT=1
RAILS_SERVE_STATIC_FILES=1
DATABASE_URL=...            # internal URL of your Rebasable Postgres

Make sure Puma binds to PORT: port ENV.fetch("PORT", 10000) in config/puma.rb.

Sidekiq

Create a background worker from the same repo with start command bundle exec sidekiq and REDIS_URL set to a Key Value internal URL.

Sinatra / Rack

Start command: bundle exec rackup --host 0.0.0.0 --port $PORT.