File tree Expand file tree Collapse file tree 5 files changed +16
-1
lines changed Expand file tree Collapse file tree 5 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ source 'https://rubygems.org'
3
3
ruby '1.9.3'
4
4
5
5
gem 'rails' , '~> 3.2.6'
6
+ gem 'unicorn'
6
7
gem 'mongoid' , '~> 3.0.0.rc'
7
8
gem 'doorkeeper' , git : 'https://github.com/andreareginato/doorkeeper' , branch : 'mongoid_v3'
8
9
gem 'rabl'
Original file line number Diff line number Diff line change 106
106
i18n (0.6.0 )
107
107
journey (1.0.4 )
108
108
json (1.7.4 )
109
+ kgio (2.7.4 )
109
110
launchy (2.1.1 )
110
111
addressable (~> 2.3 )
111
112
libwebsocket (0.1.5 )
165
166
rake (>= 0.8.7 )
166
167
rdoc (~> 3.4 )
167
168
thor (>= 0.14.6 , < 2.0 )
169
+ raindrops (0.10.0 )
168
170
rake (0.9.2.2 )
169
171
rb-fchange (0.0.5 )
170
172
ffi
220
222
uglifier (1.0.4 )
221
223
execjs (>= 0.3.0 )
222
224
multi_json (>= 1.0.2 )
225
+ unicorn (4.3.1 )
226
+ kgio (~> 2.6 )
227
+ rack
228
+ raindrops (~> 0.7 )
223
229
webmock (1.8.7 )
224
230
addressable (>= 2.2.7 )
225
231
crack (>= 0.1.7 )
@@ -260,5 +266,6 @@ DEPENDENCIES
260
266
shoulda
261
267
spork (~> 1.0rc )
262
268
uglifier (~> 1.0.3 )
269
+ unicorn
263
270
webmock
264
271
yajl-ruby
Original file line number Diff line number Diff line change 1
- web : bundle exec rails server -p $PORT
1
+ web : bundle exec unicorn -p $PORT -c ./config/unicorn.rb
Original file line number Diff line number Diff line change @@ -61,5 +61,8 @@ class Application < Rails::Application
61
61
62
62
# Middlewares
63
63
config . middleware . use 'Hostable'
64
+
65
+ # Set the default Logger in application.rb to STDOUT, otherwise logging with unicorn doesn't work
66
+ config . logger = Logger . new ( STDOUT )
64
67
end
65
68
end
Original file line number Diff line number Diff line change
1
+ worker_processes 4 # amount of unicorn workers to spin up
2
+ timeout 30 # restarts workers that hang for 30 seconds
3
+ preload_app true # load the application before forking workers (et to true if you use NewRelic or you won't see any data)
4
+ # prefork not needed for Mongoid as it is lazy loaded
You can’t perform that action at this time.
0 commit comments