Sha256: d699fa86fff726e8a41ab842d50987b864f49a726996feb01627504d99ca34fd

Contents?: true

Size: 948 Bytes

Versions: 12

Compression:

Stored size: 948 Bytes

Contents

workers Integer(ENV['PUMA_WORKERS'] || 3)
threads Integer(ENV['MIN_THREADS']  || 1), Integer(ENV['MAX_THREADS'] || 16)

preload_app!

rackup      DefaultRackup
port        ENV['PORT']     || 3000
environment ENV['RACK_ENV'] || 'production'

daemonize true
pidfile "/var/www/<%= Ahoy::VariableStore.variables['app_name'] %>/shared/tmp/pids/puma.pid"
stdout_redirect "/var/www/<%= Ahoy::VariableStore.variables['app_name'] %>/shared/tmp/log/stdout", "/var/www/<%= Ahoy::VariableStore.variables['app_name'] %>/shared/tmp/log/stderr"

bind "unix:///var/www/<%= Ahoy::VariableStore.variables['app_name'] %>/shared/tmp/sockets/puma.sock"

on_worker_boot do
  # worker specific setup
  ActiveSupport.on_load(:active_record) do
    config = ActiveRecord::Base.configurations[Rails.env] || Rails.application.config.database_configuration[Rails.env]
    config['pool'] = ENV['MAX_THREADS'] || 16
    ActiveRecord::Base.establish_connection(config)
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rails-ahoy-0.2.4 lib/generators/ahoy/templates/_puma.rb
rails-ahoy-0.2.0 lib/generators/ahoy/templates/_puma.rb
rails-ahoy-0.1.3 lib/generators/ahoy/templates/_puma.rb
rails-ahoy-0.1.2 lib/generators/ahoy/templates/_puma.rb
rails-ahoy-0.1.1 lib/generators/ahoy/templates/_puma.rb
rails-ahoy-0.1.0 lib/generators/ahoy/templates/_puma.rb
rails-ahoy-0.0.8 lib/generators/ahoy/templates/_puma.rb
rails-ahoy-0.0.7 lib/generators/ahoy/templates/_puma.rb
rails-ahoy-0.0.6 lib/generators/ahoy/templates/_puma.rb
rails-ahoy-0.0.5 lib/generators/ahoy/templates/_puma.rb
rails-ahoy-0.0.4 lib/generators/ahoy/templates/_puma.rb
rails-ahoy-0.0.3 lib/generators/ahoy/templates/_puma.rb