We were using Capistrano's shared folder because it was the default folder used by the capistrano-puma gem. However, it's easier to manage it if it's under version control. So we're moving the old `puma.rb` to `puma/development.rb`, and we use the new `puma.rb` file for all environments except development. Anyone installing CONSUL can change these files at will or change the specific files for preproduction, production and staging environments.
12 lines
419 B
Ruby
12 lines
419 B
Ruby
# Puma can serve each request in a thread from an internal thread pool.
|
|
# Default is set to 5 threads for minimum and maximum, matching the
|
|
# default thread size of Active Record.
|
|
threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i
|
|
threads threads_count, threads_count
|
|
|
|
port ENV.fetch("PORT") { 3000 }
|
|
environment "development"
|
|
|
|
# Allow puma to be restarted by `rails restart` command.
|
|
plugin :tmp_restart
|