-
Notifications
You must be signed in to change notification settings - Fork 1
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
39bbcb1
commit 3b3203a
Showing
4 changed files
with
27 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,6 @@ group :development, :test do | |
end | ||
|
||
group :production do | ||
gem 'thin' | ||
gem 'unicorn' | ||
gem 'rack-canonical-host' | ||
end |
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 @@ | ||
web: bundle exec unicorn_rails -p $PORT -c ./config/unicorn.rb |
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,17 @@ | ||
# unicorn_rails -c /data/github/current/config/unicorn.rb -E production -D | ||
|
||
rails_env = ENV['RAILS_ENV'] || 'production' | ||
|
||
# 3 workers and 1 master | ||
worker_processes 3 | ||
|
||
# Load rails+github.git into the master before forking workers | ||
# for super-fast worker spawn times | ||
preload_app true | ||
|
||
# Restart any workers that haven't responded in 30 seconds | ||
timeout 30 | ||
|
||
after_fork do |server, worker| | ||
ActiveRecord::Base.establish_connection | ||
end |