File tree 4 files changed +33
-9
lines changed
4 files changed +33
-9
lines changed Original file line number Diff line number Diff line change 1
1
source 'https://rubygems.org'
2
2
3
+ ruby '2.0.0'
4
+
3
5
gem 'rails' , '3.2.13'
4
6
5
7
# Bundle edge Rails instead:
@@ -43,7 +45,7 @@ group :test do
43
45
end
44
46
45
47
group :production do
46
- gem 'thin '
48
+ gem 'unicorn '
47
49
gem 'pg'
48
50
gem 'wkhtmltopdf-heroku'
49
51
end
55
57
# gem 'jbuilder'
56
58
57
59
# Use unicorn as the app server
58
- # gem 'unicorn'
59
60
60
61
# Deploy with Capistrano
61
62
# gem 'capistrano'
Original file line number Diff line number Diff line change 44
44
coffee-script-source
45
45
execjs
46
46
coffee-script-source (1.6.2 )
47
- daemons (1.1.9 )
48
47
devise (2.2.3 )
49
48
bcrypt-ruby (~> 3.0 )
50
49
orm_adapter (~> 0.1 )
51
50
railties (~> 3.1 )
52
51
warden (~> 1.2.1 )
53
52
diff-lcs (1.2.4 )
54
53
erubis (2.7.0 )
55
- eventmachine (1.0.3 )
56
54
execjs (1.4.0 )
57
55
multi_json (~> 1.0 )
58
56
factory_girl (4.2.0 )
74
72
railties (>= 3.0 , < 5.0 )
75
73
thor (>= 0.14 , < 2.0 )
76
74
json (1.7.7 )
75
+ kgio (2.9.2 )
77
76
libv8 (3.11.8.17 )
78
77
mail (2.5.3 )
79
78
i18n (>= 0.4.0 )
108
107
rake (>= 0.8.7 )
109
108
rdoc (~> 3.4 )
110
109
thor (>= 0.14.6 , < 2.0 )
110
+ raindrops (0.13.0 )
111
111
rake (10.0.4 )
112
112
rdoc (3.12.2 )
113
113
json (~> 1.4 )
137
137
therubyracer (0.11.4 )
138
138
libv8 (~> 3.11.8.12 )
139
139
ref
140
- thin (1.5.1 )
141
- daemons (>= 1.0.9 )
142
- eventmachine (>= 0.12.6 )
143
- rack (>= 1.0.0 )
144
140
thor (0.18.1 )
145
141
tilt (1.3.7 )
146
142
treetop (1.4.12 )
150
146
uglifier (2.0.1 )
151
147
execjs (>= 0.3.0 )
152
148
multi_json (~> 1.0 , >= 1.0.2 )
149
+ unicorn (4.8.2 )
150
+ kgio (~> 2.6 )
151
+ rack
152
+ raindrops (~> 0.7 )
153
153
validate_url (0.2.0 )
154
154
activemodel (>= 3.0.0 )
155
155
warden (1.2.1 )
@@ -176,8 +176,8 @@ DEPENDENCIES
176
176
sass-rails (~> 3.2.3 )
177
177
sqlite3
178
178
therubyracer
179
- thin
180
179
uglifier (>= 1.0.3 )
180
+ unicorn
181
181
validate_url
182
182
wicked_pdf
183
183
wkhtmltopdf-heroku
Original file line number Diff line number Diff line change
1
+ web : bundle exec unicorn -p $PORT -c ./config/unicorn.rb
Original file line number Diff line number Diff line change
1
+ worker_processes Integer ( ENV [ "WEB_CONCURRENCY" ] || 3 )
2
+ timeout 15
3
+ preload_app true
4
+
5
+ before_fork do |server , worker |
6
+ Signal . trap 'TERM' do
7
+ puts 'Unicorn master intercepting TERM and sending myself QUIT instead'
8
+ Process . kill 'QUIT' , Process . pid
9
+ end
10
+
11
+ defined? ( ActiveRecord ::Base ) and
12
+ ActiveRecord ::Base . connection . disconnect!
13
+ end
14
+
15
+ after_fork do |server , worker |
16
+ Signal . trap 'TERM' do
17
+ puts 'Unicorn worker intercepting TERM and doing nothing. Wait for master to send QUIT'
18
+ end
19
+
20
+ defined? ( ActiveRecord ::Base ) and
21
+ ActiveRecord ::Base . establish_connection
22
+ end
You can’t perform that action at this time.
0 commit comments