Sha256: 0bcda9e8876618e84edd9ca3a61d9aa9240e9776b98af337fa5f6340657cf518

Contents?: true

Size: 923 Bytes

Versions: 20

Compression:

Stored size: 923 Bytes

Contents

#!/usr/bin/env puma

directory '<%= current_path %>'
rackup '<%= current_path %>/config.ru'
environment '<%= fetch(:rails_env, 'production') %>'
tag '<%= fetch(:application)%>'
pidfile '<%= shared_path %>/pids/puma.pid'
state_path '<%= shared_path %>/pids/puma.state'
stdout_redirect '<%= shared_path %>/log/<%= fetch(:application)%>.log', '<%= shared_path %>/log/<%= fetch(:application)%>.log', true

threads <%= fetch(:puma_threads, [0, 1]).join(',')%>

bind 'unix:///tmp/<%= fetch(:application)%>.sock'

activate_control_app 'unix://<%= shared_path %>/tmp/sockets/pumactl.sock'

workers <%= fetch(:puma_workers, 2) %>

preload_app!

on_restart do
  puts 'Refreshing Gemfile'
  ENV['BUNDLE_GEMFILE'] = '<%= current_path %>/Gemfile'
end

before_fork do
  ActiveRecord::Base.connection_pool.disconnect!
end

on_worker_boot do
  ActiveSupport.on_load(:active_record) do
    ActiveRecord::Base.establish_connection
  end
end

Version data entries

20 entries across 20 versions & 3 rubygems

Version Path
pixelforce_kit-0.9 lib/pixelforce_kit/recipes/templates/puma.rb.erb
pixelforce_kit-4.0.2 lib/pixelforce_kit/recipes/templates/puma.rb.erb
pixelforce-kit-4.0.2 lib/pixelforce_kit/recipes/templates/puma.rb.erb
pixelforce_recipes-4.0 lib/recipes/templates/puma.rb.erb
pixelforce_recipes-3.9.2 lib/pixelforce_recipes/templates/puma.rb.erb
pixelforce_recipes-3.9.1 lib/pixelforce_recipes/templates/puma.rb.erb
pixelforce_recipes-3.9 lib/pixelforce_recipes/templates/puma.rb.erb
pixelforce_recipes-3.8 lib/pixelforce_recipes/templates/puma.rb.erb
pixelforce_recipes-3.7 lib/pixelforce_recipes/templates/puma.rb.erb
pixelforce_recipes-3.6 lib/pixelforce_recipes/templates/puma.rb.erb
pixelforce_recipes-3.5 lib/pixelforce_recipes/templates/puma.rb.erb
pixelforce_recipes-3.4 lib/pixelforce_recipes/templates/puma.rb.erb
pixelforce_recipes-3.3 lib/pixelforce_recipes/templates/puma.rb.erb
pixelforce_recipes-3.2 lib/pixelforce_recipes/templates/puma.rb.erb
pixelforce_recipes-3.1 lib/pixelforce_recipes/templates/puma.rb.erb
pixelforce_recipes-3.0 lib/pixelforce_recipes/templates/puma.rb.erb
pixelforce_recipes-2.4 lib/pixelforce_recipes/templates/puma.rb.erb
pixelforce_recipes-2.3 lib/pixelforce_recipes/templates/puma.rb.erb
pixelforce_recipes-2.1 lib/pixelforce_recipes/templates/puma.rb.erb
pixelforce_recipes-2.0 lib/pixelforce_recipes/templates/puma.rb.erb