deploy to heroku

This commit is contained in:
Sven Fuchs 2012-06-27 16:39:09 +02:00
parent a42b3f133c
commit 948807eedd
5 changed files with 44 additions and 0 deletions

View File

@ -1,3 +1,8 @@
source :rubygems
gem 'unicorn'
gem 'sinatra'
group :assets do
gem 'rake-pipeline', github: 'livingsocial/rake-pipeline'
gem 'rake-pipeline-web-filters', github: 'wycats/rake-pipeline-web-filters'

View File

@ -15,6 +15,7 @@ GIT
rake-pipeline (~> 0.6)
GEM
remote: http://rubygems.org/
specs:
coffee-script (2.2.0)
coffee-script-source
@ -26,20 +27,32 @@ GEM
guard (1.1.1)
listen (>= 0.4.2)
thor (>= 0.14.6)
kgio (2.7.4)
listen (0.4.4)
rb-fchange (~> 0.0.5)
rb-fsevent (~> 0.9.1)
rb-inotify (~> 0.8.8)
multi_json (1.3.6)
rack (1.4.1)
rack-protection (1.2.0)
rack
raindrops (0.10.0)
rake (0.9.2.2)
rb-fchange (0.0.5)
ffi
rb-fsevent (0.9.1)
rb-inotify (0.8.8)
ffi (>= 0.5.0)
sinatra (1.3.2)
rack (~> 1.3, >= 1.3.6)
rack-protection (~> 1.2)
tilt (~> 1.3, >= 1.3.3)
thor (0.15.2)
tilt (1.3.3)
unicorn (4.3.1)
kgio (~> 2.6)
rack
raindrops (~> 0.7)
PLATFORMS
ruby
@ -49,4 +62,6 @@ DEPENDENCIES
guard
rake-pipeline!
rake-pipeline-web-filters!
sinatra
tilt
unicorn

1
Procfile Normal file
View File

@ -0,0 +1 @@
web: bundle exec unicorn -p $PORT -c ./unicorn.rb

19
config.ru Normal file
View File

@ -0,0 +1,19 @@
$: << 'lib'
require 'sinatra'
class App < Sinatra::Base
disable :protection
set :root, File.dirname(__FILE__)
set :public_folder, lambda { "#{root}/public" }
set :static_cache_control, :public
not_found do
'Not found.'
end
end
use Rack::Deflater
run App

4
unicorn.rb Normal file
View File

@ -0,0 +1,4 @@
# http://michaelvanrooijen.com/articles/2011/06/01-more-concurrency-on-a-single-heroku-dyno-with-the-new-celadon-cedar-stack/
worker_processes 3 # amount of unicorn workers to spin up
timeout 30 # restarts workers that hang for 15 seconds