10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/simplvisor/bluepill.rb', line 10
def self.run_bluepill
Bluepill.application(ARGV[0] || 'app',
:log_file => "#{PWD}/log/bluepill.log",
:base_dir => '/tmp/bluepill',
:foreground => true
) do |app|
WATCHES.each do |cmdline, options|
name = options[:name] || File.basename(cmdline.split.first)
app.process(name) do |x|
x.working_dir = PWD
x.start_command = "bundle exec #{cmdline}"
x.pid_file = options[:pid] || "#{PWD}/log/#{name}.pid"
x.daemonize = true unless options[:reckless]
x.stdout = "#{PWD}/log/#{name}-out.log"
x.stderr = "#{PWD}/log/#{name}-err.log"
end
end
end
end
|