From 430542b9d0bfb5f406dd88faed360fd02744e65c Mon Sep 17 00:00:00 2001 From: James Darling Date: Thu, 10 May 2012 13:49:27 +0100 Subject: [PATCH] try using unicorn on heroku --- Gemfile | 3 ++- Gemfile.lock | 9 ++++++++- Procfile | 1 + unicorn.rb | 3 +++ 4 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 Procfile create mode 100644 unicorn.rb diff --git a/Gemfile b/Gemfile index 748fb48..0a4ca2d 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,4 @@ source 'http://rubygems.org' -gem 'sinatra' \ No newline at end of file +gem 'sinatra' +gem 'unicorn' diff --git a/Gemfile.lock b/Gemfile.lock index 5e5964b..02ea247 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,14 +1,21 @@ GEM remote: http://rubygems.org/ specs: + kgio (2.7.4) rack (1.3.2) + raindrops (0.8.0) sinatra (1.2.6) rack (~> 1.1) - tilt (< 2.0, >= 1.2.2) + tilt (>= 1.2.2, < 2.0) tilt (1.3.3) + unicorn (4.3.1) + kgio (~> 2.6) + rack + raindrops (~> 0.7) PLATFORMS ruby DEPENDENCIES sinatra + unicorn diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..b4a052c --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: bundle exec unicorn -p $PORT -c ./unicorn.rb \ No newline at end of file diff --git a/unicorn.rb b/unicorn.rb new file mode 100644 index 0000000..384c312 --- /dev/null +++ b/unicorn.rb @@ -0,0 +1,3 @@ +worker_processes 3 +timeout 30 +preload_app true \ No newline at end of file