Skip to content

Commit 9cb97fa

Browse files
author
Jacques Crocker
committed
add puma
1 parent 36f280d commit 9cb97fa

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Diff for: Procfile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: bundle exec puma -C config/puma.rb

Diff for: config/puma.rb

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
workers Integer(ENV['WEB_CONCURRENCY'] || 2)
2+
threads_count = Integer(ENV['MAX_THREADS'] || 5)
3+
threads threads_count, threads_count
4+
5+
preload_app!
6+
7+
rackup DefaultRackup
8+
port ENV['PORT'] || 3000
9+
environment ENV['RACK_ENV'] || 'development'
10+
11+
on_worker_boot do
12+
# Worker specific setup for Rails 4.1+
13+
# See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot
14+
ActiveRecord::Base.establish_connection
15+
end

0 commit comments

Comments
 (0)