Ruby
Requirements
Gemfile
for dependenciesProcfile
for defining how your app start
Define a Procfile
Use a Procfile
, a text file in the root directory of your application, to explicitly declare what command should be executed to start your app.
Your application should have the appropriate config file under config/
.
Puma (recommended)
web: bundle exec puma -C config/puma.rb
Unicorn
web: bundle exec unicorn -C config/unicorn.rb
Declare dependencies
Backery recognizes an app as a Ruby app by the existence of a Gemfile
file in the root directory.
You can also use it to determine the version of Ruby that will be used.
The Gemfile should look something like this:
source 'https://rubygems.org'
ruby '2.3.4'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.8'
# Use postgresql as the database for Active Record
gem 'pg'
gem 'rails_12factor', group: :production
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
When an app is deployed, Backery reads this file and installs the appropriate Ruby version together with the dependencies using the bundle install
command.