use webrick by default, document thin/puma installation

Rationale: installing thin/puma needs a working toolchain and various
libraries installed. Failing that, "gem install" will abort with an
error which doesn't give much hints to people not familiar with ruby.
Webrick is much slower, but it's pure ruby and doesn't depend on any
other gem. Sinatra will pick up what is available, in this order of
preference: thin, puma, mongrel, webrick.
This commit is contained in:
Marc Fournier 2014-06-05 01:10:55 +02:00
parent fbeb6b6a2d
commit 45ae805192
2 changed files with 13 additions and 1 deletions

View file

@ -31,7 +31,19 @@ set :bind, "1.2.3.4" # Bind to a different interface
config[:ws_config] = 'custom/config.json' # Specify custom workspace config config[:ws_config] = 'custom/config.json' # Specify custom workspace config
``` ```
Putting in production
=====================
If you expect more than a couple of simultaneous users, you should consider
running Riemann-dash in a proper application server. The easiest way is to
install thin or puma. Riemann-dash will automatically use one of them if they
are present. You'll need the C/C++ compiler, as well as the ruby and openssl
libraries and headers installed.
``` bash
$ gem install riemann-dash thin
$ riemann-dash
```
Development Development
=========== ===========

View file

@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
gem.add_dependency 'erubis', '>= 2.7.0' gem.add_dependency 'erubis', '>= 2.7.0'
gem.add_dependency 'sinatra', '~> 1.4.5' gem.add_dependency 'sinatra', '~> 1.4.5'
gem.add_dependency 'sass', '>= 3.1.14' gem.add_dependency 'sass', '>= 3.1.14'
gem.add_dependency 'thin', '~> 1.6.2' gem.add_dependency 'webrick', '~> 1.3.1'
gem.add_dependency 'multi_json', '1.3.6' gem.add_dependency 'multi_json', '1.3.6'
gem.files = `git ls-files`.split($/) gem.files = `git ls-files`.split($/)
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) } gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }