Use puma as a webserver
This commit is contained in:
parent
28b3099bd0
commit
428b36b5da
1
Gemfile
1
Gemfile
|
@ -3,6 +3,7 @@ ruby '1.9.3' rescue nil
|
||||||
source :rubygems
|
source :rubygems
|
||||||
gemspec
|
gemspec
|
||||||
|
|
||||||
|
gem 'puma'
|
||||||
gem 'travis-support', github: 'travis-ci/travis-support'
|
gem 'travis-support', github: 'travis-ci/travis-support'
|
||||||
gem 'travis-core', github: 'travis-ci/travis-core', branch: 'sf-travis-api'
|
gem 'travis-core', github: 'travis-ci/travis-core', branch: 'sf-travis-api'
|
||||||
gem 'hubble', github: 'roidrage/hubble'
|
gem 'hubble', github: 'roidrage/hubble'
|
||||||
|
|
|
@ -165,6 +165,8 @@ GEM
|
||||||
actionmailer
|
actionmailer
|
||||||
postmark (>= 0.9.0)
|
postmark (>= 0.9.0)
|
||||||
rake
|
rake
|
||||||
|
puma (1.6.3)
|
||||||
|
rack (~> 1.2)
|
||||||
pusher (0.9.4)
|
pusher (0.9.4)
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
signature (~> 0.1.2)
|
signature (~> 0.1.2)
|
||||||
|
@ -244,6 +246,7 @@ DEPENDENCIES
|
||||||
hubble!
|
hubble!
|
||||||
micro_migrations!
|
micro_migrations!
|
||||||
mocha (~> 0.12)
|
mocha (~> 0.12)
|
||||||
|
puma
|
||||||
rack-cache (~> 1.2)
|
rack-cache (~> 1.2)
|
||||||
rack-contrib!
|
rack-contrib!
|
||||||
rake (~> 0.9.2)
|
rake (~> 0.9.2)
|
||||||
|
|
|
@ -3,6 +3,6 @@ cd "$(dirname "$0")/.."
|
||||||
[ $PORT ] || PORT=3000
|
[ $PORT ] || PORT=3000
|
||||||
[ $RACK_ENV ] || RACK_ENV=development
|
[ $RACK_ENV ] || RACK_ENV=development
|
||||||
|
|
||||||
cmd="ruby -I lib -S bundle exec ruby -I lib -S thin start -p $PORT -e $RACK_ENV" #--threaded"
|
cmd="ruby -I lib -S bundle exec ruby -I lib -S puma config.ru -p $PORT -e $RACK_ENV --threads 0:16"
|
||||||
[[ $RACK_ENV == "development" ]] && exec rerun "$cmd -a 127.0.0.1"
|
[[ $RACK_ENV == "development" ]] && exec rerun "$cmd -b tcp://127.0.0.1:$PORT"
|
||||||
exec $cmd
|
exec $cmd
|
||||||
|
|
Loading…
Reference in New Issue
Block a user