diff --git a/config/puma.rb.sample b/config/puma.rb similarity index 66% rename from config/puma.rb.sample rename to config/puma.rb index bb2873488..f3e8941f6 100644 --- a/config/puma.rb.sample +++ b/config/puma.rb @@ -9,16 +9,12 @@ # end environment 'production' -daemonize true -pidfile 'tmp/pids/puma.pid' -state_path 'tmp/pids/puma.state' - -# stdout_redirect 'log/puma.log', 'log/puma_err.log' +stdout_redirect 'log/puma.log', 'log/puma_err.log' # quiet -threads 0, 30 -bind 'unix://tmp/sockets/puma.sock' +threads Integer(ENV['MIN_THREADS'] || 1), Integer(ENV['MAX_THREADS'] || 10) +bind 'unix:///tmp/coursemology_puma.sock' # ssl_bind '127.0.0.1', '9292', { key: path_to_key, cert: path_to_cert } @@ -31,12 +27,13 @@ # === Cluster mode === -# workers 2 - +workers 2 # on_worker_boot do # puts 'On worker boot...' # end # === Puma control rack application === -activate_control_app 'unix://tmp/sockets/pumactl.sock' +activate_control_app 'unix:///tmp/coursemology_pumactl.sock' + +preload_app!