1
0
Fork 0

Heroku stuff

This commit is contained in:
Andrew Tomaka 2015-10-13 14:21:59 -04:00
parent 06359bbe0b
commit e6bb48eae7
3 changed files with 25 additions and 0 deletions

View File

@ -7,7 +7,9 @@ gem 'sinatra'
gem 'sinatra-activerecord'
group :production do
gem 'rails_12factor'
gem 'pg'
gem 'puma'
end
group :development do

View File

@ -24,9 +24,15 @@ GEM
rb-inotify (>= 0.9)
minitest (5.8.1)
pg (0.18.3)
puma (2.14.0)
rack (1.6.4)
rack-protection (1.5.3)
rack
rails_12factor (0.0.3)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.4)
rails_stdout_logging (0.0.4)
rb-fsevent (0.9.6)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
@ -51,6 +57,8 @@ PLATFORMS
DEPENDENCIES
activerecord
pg
puma
rails_12factor
rerun
sinatra
sinatra-activerecord

15
puma.rb Normal file
View File

@ -0,0 +1,15 @@
workers Integer(ENV['WEB_CONCURRENCY'] || 2)
threads_count = Integer(ENV['MAX_THREADS'] || 5)
threads threads_count, threads_count
preload_app!
rackup DefaultRackup
port ENV['PORT'] || 3000
environment ENV['RACK_ENV'] || 'development'
on_worker_boot do
# Worker specific setup for Rails 4.1+
# See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot
ActiveRecord::Base.establish_connection
end