Setup for heroku
This commit is contained in:
parent
da3d78a32a
commit
d063f75fcc
4 changed files with 35 additions and 3 deletions
8
Gemfile
8
Gemfile
|
@ -1,7 +1,6 @@
|
|||
source 'https://rubygems.org'
|
||||
|
||||
gem 'rails', '4.2.4'
|
||||
gem 'sqlite3'
|
||||
gem 'sass-rails', '~> 5.0'
|
||||
gem 'uglifier', '>= 1.3.0'
|
||||
gem 'coffee-rails', '~> 4.1.0'
|
||||
|
@ -16,9 +15,16 @@ gem 'simple_form'
|
|||
|
||||
gem 'omniauth-reddit', :git => 'git://github.com/jackdempsey/omniauth-reddit.git'
|
||||
|
||||
group :production do
|
||||
gem 'rails_12factor'
|
||||
gem 'pg'
|
||||
gem 'puma'
|
||||
end
|
||||
|
||||
group :development, :test do
|
||||
gem 'dotenv-rails'
|
||||
gem 'byebug'
|
||||
gem 'sqlite3'
|
||||
end
|
||||
|
||||
group :development do
|
||||
|
|
10
Gemfile.lock
10
Gemfile.lock
|
@ -113,6 +113,8 @@ GEM
|
|||
omniauth-oauth2 (1.3.1)
|
||||
oauth2 (~> 1.0)
|
||||
omniauth (~> 1.2)
|
||||
pg (0.18.3)
|
||||
puma (2.14.0)
|
||||
quiet_assets (1.1.0)
|
||||
railties (>= 3.1, < 5.0)
|
||||
rack (1.6.4)
|
||||
|
@ -142,6 +144,11 @@ GEM
|
|||
ruby-graphviz (~> 1.2)
|
||||
rails-html-sanitizer (1.0.2)
|
||||
loofah (~> 2.0)
|
||||
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)
|
||||
railties (4.2.4)
|
||||
actionpack (= 4.2.4)
|
||||
activesupport (= 4.2.4)
|
||||
|
@ -207,9 +214,12 @@ DEPENDENCIES
|
|||
jbuilder (~> 2.0)
|
||||
jquery-rails
|
||||
omniauth-reddit!
|
||||
pg
|
||||
puma
|
||||
quiet_assets
|
||||
rails (= 4.2.4)
|
||||
rails-erd
|
||||
rails_12factor
|
||||
sass-rails (~> 5.0)
|
||||
sdoc (~> 0.4.0)
|
||||
simple_form
|
||||
|
|
|
@ -21,5 +21,6 @@ test:
|
|||
database: db/test.sqlite3
|
||||
|
||||
production:
|
||||
<<: *default
|
||||
database: db/production.sqlite3
|
||||
adapter: postgresql
|
||||
encoding: unicode
|
||||
pool: 5
|
||||
|
|
15
config/puma.rb
Normal file
15
config/puma.rb
Normal 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
|
Loading…
Reference in a new issue