Commit c97a9fd22639fb1caba74492a057a4e7b0c73b0e

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

unicorn on heroku

@@ -43,6 +43,6 @@ group :test do @@ -43,6 +43,6 @@ group :test do
43 end 43 end
44 44
45 group :heroku do 45 group :heroku do
46 - gem 'thin' 46 + gem 'unicorn'
47 end 47 end
48 48
@@ -44,7 +44,6 @@ GEM @@ -44,7 +44,6 @@ GEM
44 crack (0.3.1) 44 crack (0.3.1)
45 css_parser (1.2.5) 45 css_parser (1.2.5)
46 addressable 46 addressable
47 - daemons (1.1.4)  
48 database_cleaner (0.6.7) 47 database_cleaner (0.6.7)
49 devise (1.4.7) 48 devise (1.4.7)
50 bcrypt-ruby (~> 3.0) 49 bcrypt-ruby (~> 3.0)
@@ -56,7 +55,6 @@ GEM @@ -56,7 +55,6 @@ GEM
56 rspec (~> 2.0) 55 rspec (~> 2.0)
57 erubis (2.6.6) 56 erubis (2.6.6)
58 abstract (>= 1.0.0) 57 abstract (>= 1.0.0)
59 - eventmachine (0.12.10)  
60 factory_girl (1.3.3) 58 factory_girl (1.3.3)
61 factory_girl_rails (1.0.1) 59 factory_girl_rails (1.0.1)
62 factory_girl (~> 1.3) 60 factory_girl (~> 1.3)
@@ -80,6 +78,7 @@ GEM @@ -80,6 +78,7 @@ GEM
80 inherited_resources (1.3.0) 78 inherited_resources (1.3.0)
81 has_scope (~> 0.5.0) 79 has_scope (~> 0.5.0)
82 responders (~> 0.6.0) 80 responders (~> 0.6.0)
  81 + kgio (2.6.0)
83 libxml-ruby (2.2.2) 82 libxml-ruby (2.2.2)
84 lighthouse-api (2.0) 83 lighthouse-api (2.0)
85 activeresource (>= 3.0.0) 84 activeresource (>= 3.0.0)
@@ -149,6 +148,7 @@ GEM @@ -149,6 +148,7 @@ GEM
149 rake (>= 0.8.7) 148 rake (>= 0.8.7)
150 rdoc (~> 3.4) 149 rdoc (~> 3.4)
151 thor (~> 0.14.4) 150 thor (~> 0.14.4)
  151 + raindrops (0.8.0)
152 rake (0.9.2) 152 rake (0.9.2)
153 rbx-require-relative (0.0.5) 153 rbx-require-relative (0.0.5)
154 rdoc (3.9.4) 154 rdoc (3.9.4)
@@ -187,10 +187,6 @@ GEM @@ -187,10 +187,6 @@ GEM
187 typhoeus 187 typhoeus
188 ruby_core_source (0.1.5) 188 ruby_core_source (0.1.5)
189 archive-tar-minitar (>= 0.5.2) 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 thor (0.14.6) 190 thor (0.14.6)
195 treetop (1.4.10) 191 treetop (1.4.10)
196 polyglot 192 polyglot
@@ -199,6 +195,10 @@ GEM @@ -199,6 +195,10 @@ GEM
199 mime-types 195 mime-types
200 mime-types 196 mime-types
201 tzinfo (0.3.30) 197 tzinfo (0.3.30)
  198 + unicorn (4.1.1)
  199 + kgio (~> 2.4)
  200 + rack
  201 + raindrops (~> 0.6)
202 useragent (0.3.2) 202 useragent (0.3.2)
203 warden (1.0.5) 203 warden (1.0.5)
204 rack (>= 1.0) 204 rack (>= 1.0)
@@ -237,7 +237,7 @@ DEPENDENCIES @@ -237,7 +237,7 @@ DEPENDENCIES
237 ruby-debug 237 ruby-debug
238 ruby-debug19 238 ruby-debug19
239 ruby-fogbugz 239 ruby-fogbugz
240 - thin 240 + unicorn
241 useragent (~> 0.3.1) 241 useragent (~> 0.3.1)
242 webmock 242 webmock
243 will_paginate (>= 3) 243 will_paginate (>= 3)
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 @@ @@ -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 \ No newline at end of file 5 \ No newline at end of file