Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
55a1b9c
commit fa072c1
Showing
7 changed files
with
50 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
load "deploy" | ||
load "config/deploy" | ||
require "capistrano-unicorn" | ||
|
||
roles.clear | ||
role :app, "bushtit.obra.org" | ||
role :db, "bushtit.obra.org", :primary => true | ||
set :user, "app" | ||
|
||
set :rails_env, "production" | ||
set :deploy_to, "/var/www/rails/#{application}" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
rails_env = ENV['::Rails.env'] || 'production' | ||
|
||
worker_processes 4 | ||
preload_app true | ||
timeout 180 | ||
|
||
user 'app', 'app' | ||
|
||
app_path = File.expand_path(File.dirname(__FILE__) + "/../../../current") | ||
working_directory app_path | ||
listen "#{app_path}/tmp/sockets/unicorn.sock", :backlog => 64 | ||
stderr_path "log/unicorn.stderr.log" | ||
stdout_path "log/unicorn.stdout.log" | ||
|
||
pid "#{app_path}/tmp/pids/unicorn.pid" | ||
|
||
before_fork do |server, worker| | ||
ActiveRecord::Base.connection.disconnect! | ||
|
||
old_pid = "#{server.config[:pid]}.oldbin" | ||
if File.exists?(old_pid) && server.pid != old_pid | ||
begin | ||
Process.kill("QUIT", File.read(old_pid).to_i) | ||
rescue Errno::ENOENT, Errno::ESRCH | ||
# someone else did our job for us | ||
end | ||
end | ||
end | ||
|
||
after_fork do |server, worker| | ||
ActiveRecord::Base.establish_connection | ||
end |
This file was deleted.
Oops, something went wrong.