Skip to content
Browse files

rollback unicorn config.

  • Loading branch information...
1 parent fd33565 commit 6df5f50352b7f79acd008b3770552a91e795ac8a @saberma saberma committed Jan 17, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 config/unicorn.conf.rb.example
View
9 config/unicorn.conf.rb.example
@@ -20,7 +20,7 @@ preload_app true
# nuke workers after 30 seconds instead of 60 seconds (the default)
timeout 30
-pid "#{Rails.root}/tmp/pids/unicorn.#{application}.pid"
+pid "/u/apps/#{application}/shared/pids/unicorn.#{application}.pid"
# Production specific settings
if env == "production"
@@ -31,8 +31,9 @@ if env == "production"
# feel free to point this anywhere accessible on the filesystem
user deploy_user, deploy_group
- stderr_path "#{Rails.root}/log/unicorn.stderr.log"
- stdout_path "#{Rails.root}/log/unicorn.stdout.log"
+ shared_path = "/u/apps/#{application}/shared"
+ stderr_path "#{shared_path}/log/unicorn.stderr.log"
+ stdout_path "#{shared_path}/log/unicorn.stdout.log"
end
before_fork do |server, worker|
@@ -44,7 +45,7 @@ before_fork do |server, worker|
# Before forking, kill the master process that belongs to the .oldbin PID.
# This enables 0 downtime deploys.
- old_pid "#{Rails.root}/tmp/pids/unicorn.#{application}.pid.oldbin"
+ old_pid = "/u/apps/#{application}/shared/pids/unicorn.#{application}.pid.oldbin"
if File.exists?(old_pid) && server.pid != old_pid
begin
Process.kill("QUIT", File.read(old_pid).to_i)

0 comments on commit 6df5f50

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