Sha256: 66d5a349ebd6746dcded5b24b9c5b48d162efb5085f756607d90f55746de6e12

Contents?: true

Size: 930 Bytes

Versions: 51

Compression:

Stored size: 930 Bytes

Contents

# Change to match your CPU core count
workers {{puma_workers}}
# Min and Max threads per worker
threads {{puma_min_threads}}, {{puma_max_threads}}

app_dir = "/u/apps/{{project_name}}/current"
directory app_dir

rails_env = "{{rails_env}}"
environment rails_env

# Set up socket location
bind "tcp://127.0.0.1:9292"

# Logging
stdout_redirect "#{app_dir}/log/puma.stdout.log", "#{app_dir}/log/puma.stderr.log", true

# Set master PID and state locations
daemonize
pidfile "/u/apps/{{project_name}}/shared/tmp/pids/puma.pid"
state_path "/u/apps/{{project_name}}/shared/tmp/pids/puma.state"
activate_control_app

on_worker_boot do
  require "active_record"
  ActiveRecord::Base.connection.disconnect! rescue ActiveRecord::ConnectionNotEstablished
  ActiveRecord::Base.establish_connection(YAML.load_file("#{app_dir}/config/database.yml")[rails_env])
end

# Allow puma to be restarted by `rails restart` command.
plugin :tmp_restart

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
subspace-2.5.6 ansible/roles/puma/templates/puma.rb
subspace-2.5.5 ansible/roles/puma/templates/puma.rb
subspace-2.5.4 ansible/roles/puma/templates/puma.rb
subspace-2.5.3 ansible/roles/puma/templates/puma.rb
subspace-2.5.2 ansible/roles/puma/templates/puma.rb
subspace-2.5.1 ansible/roles/puma/templates/puma.rb
subspace-2.5 ansible/roles/puma/templates/puma.rb
subspace-2.4.2 ansible/roles/puma/templates/puma.rb
subspace-2.4.1 ansible/roles/puma/templates/puma.rb
subspace-2.4.0 ansible/roles/puma/templates/puma.rb
subspace-2.3.3 ansible/roles/puma/templates/puma.rb
subspace-2.3.2 ansible/roles/puma/templates/puma.rb
subspace-2.3.1 ansible/roles/puma/templates/puma.rb
subspace-2.3.0 ansible/roles/puma/templates/puma.rb
subspace-2.2.3 ansible/roles/puma/templates/puma.rb
subspace-2.2.2 ansible/roles/puma/templates/puma.rb
subspace-2.2.1 ansible/roles/puma/templates/puma.rb
subspace-2.2.0 ansible/roles/puma/templates/puma.rb
subspace-2.1.2 ansible/roles/puma/templates/puma.rb
subspace-2.1.1 ansible/roles/puma/templates/puma.rb