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
bundle exec rails db:migrate && bundle exec rails server -b 0.0.0.0 -p $PORTSet these variables:
| Variable | Value |
|---|---|
RAILS_ENV | production |
SECRET_KEY_BASE | the output of bin/rails secret |
RAILS_SERVE_STATIC_FILES | true |
Rails reads DATABASE_URL on its own: link a PostgreSQL or MySQL database and that's it.
Rack apps (Sinatra…)
bundle exec rackup -o 0.0.0.0 -p $PORT