From 999306ca95bd254d3ff6db11c2cbd6401f0b191b Mon Sep 17 00:00:00 2001 From: Erik Michaels-Ober Date: Mon, 20 Jun 2011 10:40:34 -0700 Subject: [PATCH] Add concurrecy with unicorn --- Gemfile | 4 ++++ Gemfile.lock | 7 ++++++- Procfile | 1 + config/unicorn.rb | 3 +++ 4 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 Procfile create mode 100644 config/unicorn.rb diff --git a/Gemfile b/Gemfile index 92639c3..2b4e3ca 100644 --- a/Gemfile +++ b/Gemfile @@ -17,6 +17,10 @@ group :development, :production do gem 'pg' end +group :production do + gem 'unicorn' +end + group :test do gem 'ZenTest' gem 'simplecov' diff --git a/Gemfile.lock b/Gemfile.lock index d37c11d..08befba 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -57,6 +57,7 @@ GEM i18n (0.6.0) jruby-openssl (0.7.4) bouncy-castle-java + kgio (2.4.2) libv8 (3.3.10.2) mail (2.3.0) i18n (>= 0.4.0) @@ -114,10 +115,13 @@ GEM uglifier (0.5.4) execjs (>= 0.3.0) multi_json (>= 1.0.2) + unicorn (3.7.0) + kgio (~> 2.3) + rack warden (1.0.4) rack (>= 1.0) webmock (1.6.4) - addressable (> 2.2.5, ~> 2.2) + addressable (~> 2.2, > 2.2.5) crack (>= 0.1.7) PLATFORMS @@ -139,4 +143,5 @@ DEPENDENCIES therubyrhino turn uglifier + unicorn webmock diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..9c82374 --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb diff --git a/config/unicorn.rb b/config/unicorn.rb new file mode 100644 index 0000000..2a77ecc --- /dev/null +++ b/config/unicorn.rb @@ -0,0 +1,3 @@ +worker_processes 2 +timeout 60 +preload_app true