Permalink
Browse files

Use unicorn

  • Loading branch information...
1 parent 30a9cde commit 575f611ae541cb3781959d3f15571bb492e5a162 @henrikhodne committed Dec 2, 2012
Showing with 33 additions and 0 deletions.
  1. +9 −0 Gemfile
  2. +15 −0 Gemfile.lock
  3. +1 −0 Procfile
  4. +8 −0 script/server
View
9 Gemfile
@@ -1,7 +1,11 @@
source :rubygems
+ruby '1.9.3' rescue nil
+
gem 'rake', '~> 10.0'
+gem 'unicorn'
+
gem 'sinatra', '~> 1.3'
gem 'mustache', '~> 0.99', require: 'mustache/sinatra'
@@ -15,3 +19,8 @@ group :test do
gem 'rspec', '~> 2.12'
gem 'rack-test', '~> 0.6', require: 'rack/test'
end
+
+group :development do
+ gem 'foreman'
+ gem 'rerun'
+end
View
15 Gemfile.lock
@@ -6,15 +6,22 @@ GEM
multipart-post (~> 1.1)
faraday_middleware (0.9.0)
faraday (>= 0.7.4, < 0.9)
+ foreman (0.60.2)
+ thor (>= 0.13.6)
json (1.7.5)
+ kgio (2.7.4)
+ listen (0.5.3)
multipart-post (1.1.5)
mustache (0.99.4)
rack (1.4.1)
rack-protection (1.2.0)
rack
rack-test (0.6.2)
rack (>= 1.0)
+ raindrops (0.10.0)
rake (10.0.2)
+ rerun (0.7.1)
+ listen
rspec (2.12.0)
rspec-core (~> 2.12.0)
rspec-expectations (~> 2.12.0)
@@ -28,18 +35,26 @@ GEM
rack (~> 1.3, >= 1.3.6)
rack-protection (~> 1.2)
tilt (~> 1.3, >= 1.3.3)
+ thor (0.14.6)
tilt (1.3.3)
+ unicorn (4.4.0)
+ kgio (~> 2.6)
+ rack
+ raindrops (~> 0.7)
PLATFORMS
ruby
DEPENDENCIES
faraday (~> 0.8.4)
faraday_middleware (~> 0.9.0)
+ foreman
json (~> 1.7)
mustache (~> 0.99)
rack-test (~> 0.6)
rake (~> 10.0)
+ rerun
rspec (~> 2.12)
sass (~> 3.2)
sinatra (~> 1.3)
+ unicorn
View
1 Procfile
@@ -0,0 +1 @@
+web: bundle exec ./script/server
View
8 script/server
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+cd "$(dirname "$0")/.."
+[ $PORT ] || PORT=3000
+[ $RACK_ENV ] || RACK_ENV=development
+
+cmd="ruby -Ilib -S bundle exec ruby -I lib -S unicorn config.ru -p $PORT -E $RACK_ENV"
+[[ $RACK_ENV == "development" ]] && exec rerun "$cmd -l 127.0.0.1:$PORT"
+exec $cmd

0 comments on commit 575f611

Please sign in to comment.