pumaのproduction用設定
config/puma.rb
# Puma can serve each request in a thread from an internal thread pool. # The `threads` method setting takes two numbers: a minimum and maximum. # Any libraries that use thread pools should be configured to match # the maximum value specified for Puma. Default is set to 5 threads for minimum # and maximum; this matches the default thread size of Active Record. # max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count } threads min_threads_count, max_threads_count # Specifies the `port` that Puma will listen on to receive requests; default is 3000. # # port ENV.fetch("PORT") { 3000 } # ここをコメントアウトなり消すなり bind "unix://#{Rails.root}/tmp/sockets/puma.sock" # 追記 daemonize # 追記 stdout_redirect "#{Rails.root}/log/stdout", "#{Rails.root}/log/stderr" # 追記 以下、省略 ...
実行時
rails s -e production