Created
May 6, 2016 15:31
-
-
Save siraz-provectus/51351ed42766241c6d54310535779e2e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
workers Integer(ENV['WEB_CONCURRENCY'] || 8) | |
threads_count = Integer(ENV['MAX_THREADS'] || 8) | |
threads threads_count, threads_count | |
preload_app! | |
rackup DefaultRackup | |
port ENV['PORT'] || 5000 | |
environment ENV['RACK_ENV'] || 'production' | |
# Set up socket location | |
#listen "/home/ubuntu/projects/navi_load/shared/sockets/unicorn.sock", :backlog => 64 | |
bind "unix:///home/ubuntu/projects/navi_production/shared/sockets/puma.sock" | |
# Logging | |
stdout_redirect "/home/ubuntu/projects/navi_production/shared/log/puma.stdout.log", "/home/ubuntu/projects/navi_production/shared/log/puma.stderr.log", true | |
# Set master PID location | |
pidfile "/home/ubuntu/projects/navi_production/shared/pids/puma.pid" | |
state_path "/home/ubuntu/projects/navi_production/shared/puma.state" | |
activate_control_app | |
on_worker_boot do | |
# Worker specific setup for Rails 4.1+ | |
# See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot | |
ActiveRecord::Base.establish_connection | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment