瀏覽代碼

Add Unicorn server

tags/last-sinatra-version
Adrian Short 10 年之前
父節點
當前提交
7457e8a3ea
共有 3 個文件被更改,包括 15 次插入0 次删除
  1. +2
    -0
      Gemfile
  2. +7
    -0
      Gemfile.lock
  3. +6
    -0
      config/unicorn.rb

+ 2
- 0
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'


+ 7
- 0
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

+ 6
- 0
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

Loading…
取消
儲存