Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 7117e41efd
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (20 sloc) 1.025 kb
Bluepill.application("phonebook") do |app|
app.process("phonebook::unicorn") do |process|
rails_root = "/var/www/railsapps/phonebook/current"
process.pid_file = File.join(rails_root, 'tmp', 'pids', 'unicorn.pid')
process.working_dir = rails_root
process.log_file = File.join(rails_root, 'log', 'bluepill.log')
process.start_command = "unicorn_rails -Dc config/unicorn.rb -E production"
process.stop_command = "kill -QUIT {{PID}}"
process.restart_command = "kill -USR2 {{PID}}"
process.uid = process.gid = 'railrunner'
process.start_grace_time = 8.seconds
process.stop_grace_time = 5.seconds
process.restart_grace_time = 13.seconds
process.monitor_children do |child_process|
child_process.stop_command = "kill -QUIT {{PID}}"
child_process.checks :mem_usage, :every => 10.seconds, :below => 150.megabytes, :times => [3,4], :fires => :stop
child_process.checks :cpu_usage, :every => 10.seconds, :below => 20, :times => [3,4], :fires => :stop
end
end
end
Jump to Line
Something went wrong with that request. Please try again.