Skip to content
This repository has been archived by the owner on Mar 23, 2021. It is now read-only.

Commit

Permalink
Add: Puma instead of Unicorn (with default config.)
Browse files Browse the repository at this point in the history
  • Loading branch information
seawolf committed May 25, 2015
1 parent 40b15b9 commit bea7fb1
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 80 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ruby '2.1.5'
# Application
gem 'airbrake', '~> 4.0.0'
gem 'rails', '~> 4.0.0'
gem 'unicorn'
gem 'puma'

# Views
gem 'jquery-rails', '~> 3.1.2'
Expand All @@ -24,4 +24,4 @@ group :staging, :production do
gem 'rails_12factor'
gem 'newrelic_rpm'
gem 'uglifier', '>= 2.7.0'
end
end
10 changes: 3 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ GEM
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.2)
kgio (2.9.3)
mail (2.6.3)
mime-types (>= 1.16, < 3)
mime-types (2.4.3)
Expand All @@ -60,6 +59,8 @@ GEM
newrelic_rpm (3.9.9.275)
orm_adapter (0.5.0)
pg (0.18.1)
puma (2.11.3)
rack (>= 1.1, < 2.0)
rack (1.5.2)
rack-test (0.6.3)
rack (>= 1.0)
Expand All @@ -81,7 +82,6 @@ GEM
activesupport (= 4.0.13)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
raindrops (0.13.0)
rake (10.4.2)
rspec-core (2.14.8)
rspec-expectations (2.14.5)
Expand Down Expand Up @@ -113,10 +113,6 @@ GEM
uglifier (2.7.0)
execjs (>= 0.3.0)
json (>= 1.8.0)
unicorn (4.8.3)
kgio (~> 2.6)
rack
raindrops (~> 0.7)
warden (1.2.3)
rack (>= 1.0)

Expand All @@ -131,9 +127,9 @@ DEPENDENCIES
jquery-rails (~> 3.1.2)
newrelic_rpm
pg (~> 0.18.1)
puma
rails (~> 4.0.0)
rails_12factor
rspec-rails (~> 2.14.2)
tinymce-rails (~> 4.1.6)
uglifier (>= 2.7.0)
unicorn
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb
web: bundle exec puma -C config/puma.rb
15 changes: 15 additions & 0 deletions config/puma.rb
Original file line number Diff line number Diff line change
@@ -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
70 changes: 0 additions & 70 deletions config/unicorn.rb

This file was deleted.

0 comments on commit bea7fb1

Please sign in to comment.