use thin and rack for deployment. it plays nicer with monit

master
Coleman 2008-11-23 14:55:38 -06:00
parent ffd48aef82
commit b0a2d54c3e
3 changed files with 25 additions and 15 deletions

11
config.ru Normal file
View File

@ -0,0 +1,11 @@
require 'rubygems'
require 'sinatra'
Sinatra::Application.default_options.merge!(
:run => false,
:env => :production
)
require 'binaryattraction_facebooker'
run Sinatra.application

14
config.yml Normal file
View File

@ -0,0 +1,14 @@
---
environment: production
chdir: /webapp/binaryattraction
address: 127.0.0.1
user: webapp
group: webapp
port: 12501
pid: /webapp/binaryattraction/log/sinatra.pid
rackup: /webapp/binaryattraction/config.ru
log: /webapp/binaryattraction/sinatra.log
max_conns: 1024
timeout: 30
max_persistent_conns: 512
daemonize: true

View File

@ -1,15 +0,0 @@
#!/usr/bin/env ruby
require 'rubygems'
require 'daemons'
opts = {
:app_name => 'binaryattraction_facebooker',
:dir_mode => :script,
:dir => '/log',
:backtrace => true,
:multiple => true,
:log_output => true
}
Daemons.run(File.dirname(__FILE__) + '/binaryattraction_facebooker.rb', opts)