deploy to heroku
This commit is contained in:
parent
a42b3f133c
commit
948807eedd
5
Gemfile
5
Gemfile
|
@ -1,3 +1,8 @@
|
||||||
|
source :rubygems
|
||||||
|
|
||||||
|
gem 'unicorn'
|
||||||
|
gem 'sinatra'
|
||||||
|
|
||||||
group :assets do
|
group :assets do
|
||||||
gem 'rake-pipeline', github: 'livingsocial/rake-pipeline'
|
gem 'rake-pipeline', github: 'livingsocial/rake-pipeline'
|
||||||
gem 'rake-pipeline-web-filters', github: 'wycats/rake-pipeline-web-filters'
|
gem 'rake-pipeline-web-filters', github: 'wycats/rake-pipeline-web-filters'
|
||||||
|
|
15
Gemfile.lock
15
Gemfile.lock
|
@ -15,6 +15,7 @@ GIT
|
||||||
rake-pipeline (~> 0.6)
|
rake-pipeline (~> 0.6)
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
|
remote: http://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
coffee-script (2.2.0)
|
coffee-script (2.2.0)
|
||||||
coffee-script-source
|
coffee-script-source
|
||||||
|
@ -26,20 +27,32 @@ GEM
|
||||||
guard (1.1.1)
|
guard (1.1.1)
|
||||||
listen (>= 0.4.2)
|
listen (>= 0.4.2)
|
||||||
thor (>= 0.14.6)
|
thor (>= 0.14.6)
|
||||||
|
kgio (2.7.4)
|
||||||
listen (0.4.4)
|
listen (0.4.4)
|
||||||
rb-fchange (~> 0.0.5)
|
rb-fchange (~> 0.0.5)
|
||||||
rb-fsevent (~> 0.9.1)
|
rb-fsevent (~> 0.9.1)
|
||||||
rb-inotify (~> 0.8.8)
|
rb-inotify (~> 0.8.8)
|
||||||
multi_json (1.3.6)
|
multi_json (1.3.6)
|
||||||
rack (1.4.1)
|
rack (1.4.1)
|
||||||
|
rack-protection (1.2.0)
|
||||||
|
rack
|
||||||
|
raindrops (0.10.0)
|
||||||
rake (0.9.2.2)
|
rake (0.9.2.2)
|
||||||
rb-fchange (0.0.5)
|
rb-fchange (0.0.5)
|
||||||
ffi
|
ffi
|
||||||
rb-fsevent (0.9.1)
|
rb-fsevent (0.9.1)
|
||||||
rb-inotify (0.8.8)
|
rb-inotify (0.8.8)
|
||||||
ffi (>= 0.5.0)
|
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)
|
thor (0.15.2)
|
||||||
tilt (1.3.3)
|
tilt (1.3.3)
|
||||||
|
unicorn (4.3.1)
|
||||||
|
kgio (~> 2.6)
|
||||||
|
rack
|
||||||
|
raindrops (~> 0.7)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
@ -49,4 +62,6 @@ DEPENDENCIES
|
||||||
guard
|
guard
|
||||||
rake-pipeline!
|
rake-pipeline!
|
||||||
rake-pipeline-web-filters!
|
rake-pipeline-web-filters!
|
||||||
|
sinatra
|
||||||
tilt
|
tilt
|
||||||
|
unicorn
|
||||||
|
|
19
config.ru
Normal file
19
config.ru
Normal 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
4
unicorn.rb
Normal 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
|
Loading…
Reference in New Issue
Block a user