Sha256: 9ba5367cfed35d20f4bb4cef3ed36a04e823e1df39d7e5403fbecd11db918288
Contents?: true
Size: 1.63 KB
Versions: 19
Compression:
Stored size: 1.63 KB
Contents
ENV["RAILS_ENV"] = "<%= stage %>" Bluepill.application("<%= application %>-<%= stage %>", :log_file => '<%= log_file %>') do |app| app.process("unicorn") do |process| process.pid_file = '<%= unicorn_config_path %>' process.working_dir = '/var/my_app/current' process.start_command = "/usr/local/bin/bundle exec unicorn -c /var/my_app/current/config/unicorn.rb -E staging -D" process.stop_command = "kill -QUIT {{PID}}" process.restart_command = "kill -USR2 {{PID}}" process.uid = process.gid = 'deploy' process.start_grace_time = 30.seconds process.stop_grace_time = 30.seconds process.restart_grace_time = 30.seconds process.monitor_children do |child_process| child_process.stop_command = "kill -QUIT {{PID}}" child_process.checks :mem_usage, :every => 30.seconds, :below => 200.megabytes, :times => [3, 4], :fires => :stop child_process.checks :cpu_usage, :every => 30.seconds, :below => 40, :times => [3, 4], :fires => :stop end end 2.times do |i| app.process("resque-#{i}") do |process| process.working_dir = '/var/my_app/current' process.group = "resque" process.start_command = "/usr/local/bin/bundle exec rake resque:work" process.pid_file = "/var/my_app/shared/pids/my_app-resque-#{i}.pid" process.stop_command = "kill -QUIT {{PID}}" process.daemonize = true process.start_grace_time = 30.seconds process.stop_grace_time = 30.seconds process.uid = process.gid = 'deploy' end end end
Version data entries
19 entries across 19 versions & 1 rubygems