diff --git a/Gemfile b/Gemfile index 0091ead0d0..ae0d3fbe31 100644 --- a/Gemfile +++ b/Gemfile @@ -7,6 +7,7 @@ gem 'rails', '3.1.4' gem 'pg' gem 'spree' +gem 'unicorn' # Gems used only for assets and not required diff --git a/Gemfile.lock b/Gemfile.lock index f94b9521b2..a7c8532610 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -84,6 +84,7 @@ GEM actionpack (>= 3.0.0) activesupport (>= 3.0.0) railties (>= 3.0.0) + kgio (2.7.4) mail (2.3.3) i18n (>= 0.4.0) mime-types (~> 1.16) @@ -136,6 +137,7 @@ GEM rake (>= 0.8.7) rdoc (~> 3.4) thor (~> 0.14.6) + raindrops (0.8.0) rake (0.9.2.2) rdoc (3.12) json (~> 1.4) @@ -212,6 +214,10 @@ GEM uglifier (1.2.3) execjs (>= 0.3.0) multi_json (>= 1.0.2) + unicorn (4.2.1) + kgio (~> 2.6) + rack + raindrops (~> 0.7) warden (1.0.6) rack (>= 1.0) wasabi (2.1.0) @@ -231,3 +237,4 @@ DEPENDENCIES spree_usa_epay turn (~> 0.8.3) uglifier (>= 1.0.3) + unicorn diff --git a/Procfile b/Procfile new file mode 100644 index 0000000000..9249f1e3f5 --- /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 0000000000..6f6f2fcc14 --- /dev/null +++ b/config/unicorn.rb @@ -0,0 +1,2 @@ +worker_processes 4 # amount of unicorn workers to spin up +timeout 30 # restarts workers that hang for 30 seconds \ No newline at end of file