Commit c97a9fd22639fb1caba74492a057a4e7b0c73b0e

Authored by Marcin Ciunelis
1 parent f3aa7ac0
Exists in master and in 1 other branch production

unicorn on heroku

Gemfile
... ... @@ -43,6 +43,6 @@ group :test do
43 43 end
44 44  
45 45 group :heroku do
46   - gem 'thin'
  46 + gem 'unicorn'
47 47 end
48 48  
... ...
Gemfile.lock
... ... @@ -44,7 +44,6 @@ GEM
44 44 crack (0.3.1)
45 45 css_parser (1.2.5)
46 46 addressable
47   - daemons (1.1.4)
48 47 database_cleaner (0.6.7)
49 48 devise (1.4.7)
50 49 bcrypt-ruby (~> 3.0)
... ... @@ -56,7 +55,6 @@ GEM
56 55 rspec (~> 2.0)
57 56 erubis (2.6.6)
58 57 abstract (>= 1.0.0)
59   - eventmachine (0.12.10)
60 58 factory_girl (1.3.3)
61 59 factory_girl_rails (1.0.1)
62 60 factory_girl (~> 1.3)
... ... @@ -80,6 +78,7 @@ GEM
80 78 inherited_resources (1.3.0)
81 79 has_scope (~> 0.5.0)
82 80 responders (~> 0.6.0)
  81 + kgio (2.6.0)
83 82 libxml-ruby (2.2.2)
84 83 lighthouse-api (2.0)
85 84 activeresource (>= 3.0.0)
... ... @@ -149,6 +148,7 @@ GEM
149 148 rake (>= 0.8.7)
150 149 rdoc (~> 3.4)
151 150 thor (~> 0.14.4)
  151 + raindrops (0.8.0)
152 152 rake (0.9.2)
153 153 rbx-require-relative (0.0.5)
154 154 rdoc (3.9.4)
... ... @@ -187,10 +187,6 @@ GEM
187 187 typhoeus
188 188 ruby_core_source (0.1.5)
189 189 archive-tar-minitar (>= 0.5.2)
190   - thin (1.2.11)
191   - daemons (>= 1.0.9)
192   - eventmachine (>= 0.12.6)
193   - rack (>= 1.0.0)
194 190 thor (0.14.6)
195 191 treetop (1.4.10)
196 192 polyglot
... ... @@ -199,6 +195,10 @@ GEM
199 195 mime-types
200 196 mime-types
201 197 tzinfo (0.3.30)
  198 + unicorn (4.1.1)
  199 + kgio (~> 2.4)
  200 + rack
  201 + raindrops (~> 0.6)
202 202 useragent (0.3.2)
203 203 warden (1.0.5)
204 204 rack (>= 1.0)
... ... @@ -237,7 +237,7 @@ DEPENDENCIES
237 237 ruby-debug
238 238 ruby-debug19
239 239 ruby-fogbugz
240   - thin
  240 + unicorn
241 241 useragent (~> 0.3.1)
242 242 webmock
243 243 will_paginate (>= 3)
... ...
Procfile
1   -web: bundle exec rails server thin -p $PORT
  1 +web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb
... ...
config/unicorn.rb 0 → 100644
... ... @@ -0,0 +1,4 @@
  1 +# http://michaelvanrooijen.com/articles/2011/06/01-more-concurrency-on-a-single-heroku-dyno-with-the-new-celadon-cedar-stack/
  2 +
  3 +worker_processes 3 # amount of unicorn workers to spin up
  4 +timeout 30 # restarts workers that hang for 30 seconds
0 5 \ No newline at end of file
... ...