diff --git a/Procfile b/Procfile index 69bdb4a..c2c566e 100755 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: rvmsudo bundle exec unicorn -p 9000 +web: bundle exec puma -C config/puma.rb diff --git a/config/puma.rb b/config/puma.rb new file mode 100644 index 0000000..5370354 --- /dev/null +++ b/config/puma.rb @@ -0,0 +1,15 @@ +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 + +port ENV.fetch("PORT", 3000) + +environment ENV.fetch("RAILS_ENV", "development") + +pidfile ENV.fetch("PIDFILE", "tmp/pids/server.pid") + +workers ENV.fetch("WEB_CONCURRENCY", 2) + +preload_app! + +plugin :tmp_restart