Skip to content

Instantly share code, notes, and snippets.

@yuki-yano
Created August 13, 2016 13:59
Show Gist options
  • Select an option

  • Save yuki-yano/a592750af4cb065bbd3704398ee954df to your computer and use it in GitHub Desktop.

Select an option

Save yuki-yano/a592750af4cb065bbd3704398ee954df to your computer and use it in GitHub Desktop.
#!/usr/bin/env puma
directory '/home/ec2-user/apps/reversal/current'
rackup '/home/ec2-user/apps/reversal/current/config.ru'
environment 'production'
pidfile '/home/ec2-user/apps/reversal/shared/tmp/pids/puma.pid'
state_path '/home/ec2-user/apps/reversal/shared/tmp/pids/puma.state'
stdout_redirect '/home/ec2-user/apps/reversal/current/log/puma.error.log', '/home/ec2-user/apps/reversal/current/log/puma.access.log', true
threads 0, 16
bind 'unix:///home/ec2-user/apps/reversal/shared/tmp/sockets/puma.sock'
workers 0
preload_app!
on_restart do
puts 'Refreshing Gemfile'
ENV["BUNDLE_GEMFILE"] = "/home/ec2-user/apps/reversal/current/Gemfile"
end
on_worker_boot do
ActiveSupport.on_load(:active_record) do
ActiveRecord::Base.establish_connection
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment