From c6dcc070dbdde20918d63a3ba2f8c21485bdf9e7 Mon Sep 17 00:00:00 2001 From: magnolia-fan Date: Wed, 5 Oct 2011 21:35:07 +0400 Subject: [PATCH] Moving to cedar --- Gemfile | 3 +-- Gemfile.lock | 15 ++++++++------- Procfile | 1 + config/unicorn.rb | 2 ++ 4 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 Procfile create mode 100644 config/unicorn.rb diff --git a/Gemfile b/Gemfile index b0dbd1b..10e83c7 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,7 @@ source 'http://rubygems.org' gem 'rails', '3.1.0' +gem 'unicorn' gem 'json' gem 'nokogiri' @@ -10,7 +11,6 @@ gem 'sass' gem 'coffee-script' gem 'therubyracer', :require => false -# gem 'barista' gem 'awesome_print', :require => 'ap' gem 'delayed_job' @@ -26,5 +26,4 @@ end group :production do gem 'pg' gem 'uglifier' - gem 'thin' end \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 34a2011..154e32a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -52,13 +52,13 @@ GEM activesupport (~> 3.0) daemons erubis (2.7.0) - eventmachine (0.12.10) execjs (1.2.9) multi_json (~> 1.0) haml (3.1.3) hike (1.2.1) i18n (0.6.0) json (1.6.1) + kgio (2.6.0) libv8 (3.3.10.2) mail (2.3.0) i18n (>= 0.4.0) @@ -96,6 +96,7 @@ GEM rake (>= 0.8.7) rdoc (~> 3.4) thor (~> 0.14.6) + raindrops (0.7.0) rake (0.9.2) rdoc (3.9.4) sass (3.1.8) @@ -103,12 +104,8 @@ GEM hike (~> 1.2) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) - therubyracer (0.9.4) + therubyracer (0.9.5) libv8 (~> 3.3.10) - thin (1.2.11) - daemons (>= 1.0.9) - eventmachine (>= 0.12.6) - rack (>= 1.0.0) thor (0.14.6) tilt (1.3.3) treetop (1.4.10) @@ -118,6 +115,10 @@ GEM uglifier (1.0.3) execjs (>= 0.3.0) multi_json (>= 1.0.2) + unicorn (4.1.1) + kgio (~> 2.4) + rack + raindrops (~> 0.6) PLATFORMS ruby @@ -137,5 +138,5 @@ DEPENDENCIES rails (= 3.1.0) sass therubyracer - thin uglifier + unicorn diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..9249f1e --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb \ No newline at end of file diff --git a/config/unicorn.rb b/config/unicorn.rb new file mode 100644 index 0000000..c3652b8 --- /dev/null +++ b/config/unicorn.rb @@ -0,0 +1,2 @@ +worker_processes 2 # amount of unicorn workers to spin up +timeout 30 # restarts workers that hang for 30 seconds \ No newline at end of file