diff --git a/Gemfile b/Gemfile index 8acf22e..588e466 100644 --- a/Gemfile +++ b/Gemfile @@ -5,10 +5,13 @@ gem 'rails', '3.2.8' gem 'dynamic_form' # for form.error_messages gem 'pg' -group :assets do +group :assets, :production do gem 'sass-rails', '~> 3.2.3' gem 'coffee-rails', '~> 3.2.1' gem 'jquery-rails' gem 'uglifier', '>= 1.0.3' end +group :production do + gem 'unicorn' +end diff --git a/Gemfile.lock b/Gemfile.lock index 69fc69b..4b0c1fe 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -48,6 +48,7 @@ GEM railties (>= 3.1.0, < 5.0) thor (~> 0.14) json (1.7.5) + kgio (2.7.4) mail (2.4.4) i18n (>= 0.4.0) mime-types (~> 1.16) @@ -78,6 +79,7 @@ GEM rake (>= 0.8.7) rdoc (~> 3.4) thor (>= 0.14.6, < 2.0) + raindrops (0.10.0) rake (0.9.2.2) rdoc (3.12) json (~> 1.4) @@ -99,6 +101,10 @@ GEM uglifier (1.3.0) execjs (>= 0.3.0) multi_json (~> 1.0, >= 1.0.2) + unicorn (4.4.0) + kgio (~> 2.6) + rack + raindrops (~> 0.7) PLATFORMS ruby @@ -111,3 +117,4 @@ DEPENDENCIES rails (= 3.2.8) sass-rails (~> 3.2.3) uglifier (>= 1.0.3) + unicorn 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..b3c0185 --- /dev/null +++ b/config/unicorn.rb @@ -0,0 +1,2 @@ +worker_processes 4 # number of workers to spin up +timeout 30 # restart workers that hang for 30 seconds