QODDI DOCUMENTATION
Ruby Default Web Server
Last updated
Choose your production server explicitly in a Procfile. The example below uses Puma; see the Ruby guide for runtime and dependency configuration.
Install Puma as Web Server
Add Puma to your application with bundle add puma, commit both Bundler files, and set the Procfile:
web: bundle exec puma -C config/puma.rbA small starting configuration in config/puma.rb is:
threads_count = Integer(ENV.fetch("RAILS_MAX_THREADS", "3"))
threads threads_count, threads_count
bind "tcp://0.0.0.0:#{ENV.fetch('PORT')}"
environment ENV.fetch("RACK_ENV", "production")Set PORT in the app environment and align it with network routing. This starts a single process; add workers only after measuring memory and concurrency needs. For Rails, set RAILS_ENV=production as well and use the configuration generated by your Rails version when it contains framework-specific setup.
See Puma configuration for threads, workers, and lifecycle hooks.