Skip to content
Browse files

Fix layout

  • Loading branch information...
1 parent a1bd709 commit 31405cd9c6c7bea34077b4be5d8025f7a50935b6 Chris Harper committed Jul 9, 2013
Showing with 6 additions and 1 deletion.
  1. +6 −1 README.md
View
7 README.md
@@ -55,7 +55,7 @@ config/deploy/staging.rb
<code><pre>
set :rails_env , 'staging'
server 'APP_URL', :app, :web, :db, :primary => true
-</code></pre>
+</pre></code>
Then setup the folders and deploy with
@@ -73,22 +73,27 @@ config/unicorn.rb
worker_processes 4
timeout 15
preload_app true
+
listen "/var/www/APP_NAME/current/tmp/unicorn.sock", :backlog => 64
pid "/var/www/APP_NAME/current/tmp/pids/unicorn.pid"
stderr_path "/var/www/APP_NAME/current/log/unicorn.stderr.log"
stdout_path "/var/www/APP_NAME/current/log/unicorn.stdout.log"
+
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

0 comments on commit 31405cd

Please sign in to comment.
Something went wrong with that request. Please try again.