This commit is contained in:
2025-11-07 13:34:32 -08:00
commit 1e8c5a972b
436 changed files with 11000 additions and 0 deletions

18
config/puma.rb Normal file
View File

@@ -0,0 +1,18 @@
threads_count = ENV.fetch("RAILS_MAX_THREADS", 3)
threads threads_count, threads_count
rails_env = ENV.fetch("RAILS_ENV", "development")
environment rails_env
case rails_env
when "production"
workers_count = Integer(ENV.fetch("WEB_CONCURRENCY") { (Concurrent.processor_count * 0.666).ceil })
workers workers_count if workers_count > 1
preload_app!
when "development"
worker_timeout 3600 # Don't let worker die during debugger session
end
port ENV.fetch("PORT", 3000)
plugin :tmp_restart