Skip to content

Instantly share code, notes, and snippets.

@mcfearsome
Created July 4, 2019 16:08
Show Gist options
  • Save mcfearsome/34f2ea0aa0d8d5da66666ad3ad593d69 to your computer and use it in GitHub Desktop.
Save mcfearsome/34f2ea0aa0d8d5da66666ad3ad593d69 to your computer and use it in GitHub Desktop.
threads_count = ENV.fetch('RAILS_MAX_THREADS') { 5 }.to_i
threads threads_count, threads_count
port ENV.fetch('PORT') { 3000 }
env = ENV.fetch('RAILS_ENV') { 'development' }
environment env
plugin :tmp_restart
unless env == 'test' || env == 'development'
workers ENV.fetch('WEB_CONCURRENCY') { 1 }
set_remote_address header: 'X-Real-IP'
queue_requests false
preload_app!
end
@mcfearsome
Copy link
Author

queue_requests false is a recent addition as we are waiting on puma/puma#1737

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment