Commit 6b294551 authored by Richard Schneeman's avatar Richard Schneeman

Merge pull request #4 from heroku/schneems/puma

replace unicorn with puma!
parents 5ad3262d bb90096b
......@@ -29,8 +29,7 @@ gem 'spring', group: :development
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use unicorn as the app server
gem 'unicorn'
gem 'puma'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
......
......@@ -47,13 +47,14 @@ GEM
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.1)
kgio (2.9.2)
mail (2.6.3)
mime-types (>= 1.16, < 3)
mime-types (2.4.3)
minitest (5.4.3)
multi_json (1.10.1)
pg (0.17.1)
puma (2.9.1)
rack (>= 1.1, < 2.0)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
......@@ -77,7 +78,6 @@ GEM
activesupport (= 4.1.8)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
raindrops (0.13.0)
rake (10.4.0)
rdoc (4.1.2)
json (~> 1.4)
......@@ -110,10 +110,6 @@ GEM
uglifier (2.5.3)
execjs (>= 0.3.0)
json (>= 1.8.0)
unicorn (4.8.3)
kgio (~> 2.6)
rack
raindrops (~> 0.7)
PLATFORMS
ruby
......@@ -123,6 +119,7 @@ DEPENDENCIES
jbuilder (~> 2.0)
jquery-rails
pg
puma
rails (= 4.1.8)
rails_12factor
sass-rails (~> 4.0.3)
......@@ -130,4 +127,3 @@ DEPENDENCIES
spring
turbolinks
uglifier (>= 1.3.0)
unicorn
web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb
web: bundle exec puma -t 5:5 -P ${PORT:-3000} -e ${RACK_ENV:-development}
worker_processes Integer(ENV["WEB_CONCURRENCY"] || 3)
timeout 15
preload_app true
before_fork do |server, worker|
Signal.trap 'TERM' do
puts 'Unicorn master intercepting TERM and sending myself QUIT instead'
Process.kill 'QUIT', Process.pid
end
defined?(ActiveRecord::Base) and
ActiveRecord::Base.connection.disconnect!
end
after_fork do |server, worker|
Signal.trap 'TERM' do
puts 'Unicorn worker intercepting TERM and doing nothing. Wait for master to send QUIT'
end
defined?(ActiveRecord::Base) and
ActiveRecord::Base.establish_connection
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment