From b0a2d54c3e2689ace959f09b75d7d7937d9cd2e3 Mon Sep 17 00:00:00 2001 From: Coleman Date: Sun, 23 Nov 2008 14:55:38 -0600 Subject: [PATCH] use thin and rack for deployment. it plays nicer with monit --- config.ru | 11 +++++++++++ config.yml | 14 ++++++++++++++ facebook_daemon | 15 --------------- 3 files changed, 25 insertions(+), 15 deletions(-) create mode 100644 config.ru create mode 100644 config.yml delete mode 100755 facebook_daemon diff --git a/config.ru b/config.ru new file mode 100644 index 0000000..2c0fefd --- /dev/null +++ b/config.ru @@ -0,0 +1,11 @@ +require 'rubygems' +require 'sinatra' + +Sinatra::Application.default_options.merge!( + :run => false, + :env => :production +) + +require 'binaryattraction_facebooker' +run Sinatra.application + diff --git a/config.yml b/config.yml new file mode 100644 index 0000000..74c7007 --- /dev/null +++ b/config.yml @@ -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 diff --git a/facebook_daemon b/facebook_daemon deleted file mode 100755 index 23dcb69..0000000 --- a/facebook_daemon +++ /dev/null @@ -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)