DockHostingDocs
Stacks

Ruby and Rails

Deploy a Ruby on Rails or Rack app from its Gemfile.

What we detect

A Gemfile makes it a Ruby app; rails in it makes it a Rails app. We run bundle install and start the app.

Rails

Start command
bundle exec rails db:migrate && bundle exec rails server -b 0.0.0.0 -p $PORT

Set these variables:

VariableValue
RAILS_ENVproduction
SECRET_KEY_BASEthe output of bin/rails secret
RAILS_SERVE_STATIC_FILEStrue

Rails reads DATABASE_URL on its own: link a PostgreSQL or MySQL database and that's it.

Rack apps (Sinatra…)

Start command
bundle exec rackup -o 0.0.0.0 -p $PORT

On this page