use thin and rack for deployment. it plays nicer with monit
parent
ffd48aef82
commit
b0a2d54c3e
|
@ -0,0 +1,11 @@
|
|||
require 'rubygems'
|
||||
require 'sinatra'
|
||||
|
||||
Sinatra::Application.default_options.merge!(
|
||||
:run => false,
|
||||
:env => :production
|
||||
)
|
||||
|
||||
require 'binaryattraction_facebooker'
|
||||
run Sinatra.application
|
||||
|
|
@ -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
|
|
@ -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)
|
Reference in New Issue