diff --git a/Gemfile b/Gemfile index 48aa662..9b1b7b8 100644 --- a/Gemfile +++ b/Gemfile @@ -1,10 +1,12 @@ source "https://rubygems.org/" +ruby "1.9.3" gem 'sinatra' gem 'haml' gem 'data_mapper' gem 'dm-postgres-adapter' gem 'pg' +gem 'unicorn' group :development do gem 'shotgun' diff --git a/Gemfile.lock b/Gemfile.lock index cc37f62..9fbd38b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -56,10 +56,12 @@ GEM tilt json (1.8.0) json_pure (1.8.0) + kgio (2.9.2) mime-types (1.23) multi_json (1.7.3) pg (0.15.1) rack (1.5.2) + raindrops (0.13.0) rest-client (1.6.7) mime-types (>= 1.16) sequel (3.20.0) @@ -74,6 +76,10 @@ GEM sequel (~> 3.20.0) sinatra (~> 1.0.0) tilt (1.4.1) + unicorn (4.8.2) + kgio (~> 2.6) + rack + raindrops (~> 0.7) uuidtools (2.1.4) PLATFORMS @@ -87,3 +93,4 @@ DEPENDENCIES shotgun sinatra taps + unicorn diff --git a/config/unicorn.rb b/config/unicorn.rb new file mode 100644 index 0000000..af39226 --- /dev/null +++ b/config/unicorn.rb @@ -0,0 +1,6 @@ +# http://datachomp.com/archives/using-unicorn-with-sinatra-or-padrino-on-heroku/ +# https://devcenter.heroku.com/articles/rails-unicorn + +worker_processes Integer(ENV["WEB_CONCURRENCY"] || 3) +timeout 15 +preload_app true