Sha256: 8078f79e7c1afc830852c2e74c68a0b75065ffa19f0a6ebc92fc6f3b2e11313b
Contents?: true
Size: 1.13 KB
Versions: 1
Compression:
Stored size: 1.13 KB
Contents
# ------------------------------------------------------------------------------ # Sample rails 3 config # ------------------------------------------------------------------------------ # Set your full path to application. app_path = "/path/to/app" # Set rainbows options worker_processes 1 preload_app true timeout 180 listen "127.0.0.1:9000" # Spawn rainbows master worker for user apps (group: apps) user 'apps', 'apps' # Fill path to your app working_directory app_path # Should be 'production' by default, otherwise use other env rails_env = ENV['RAILS_ENV'] || 'production' # Log everything to one file stderr_path "log/rainbows.log" stdout_path "log/rainbows.log" # Set master PID location pid "#{app_path}/tmp/pids/rainbows.pid" before_fork do |server, worker| ActiveRecord::Base.connection.disconnect! old_pid = "#{server.config[:pid]}.oldbin" if File.exists?(old_pid) && server.pid != old_pid begin Process.kill("QUIT", File.read(old_pid).to_i) rescue Errno::ENOENT, Errno::ESRCH # someone else did our job for us end end end after_fork do |server, worker| ActiveRecord::Base.establish_connection end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
capistrano-rainbows-0.0.1 | examples/rails3.rb |