Skip to content

Commit 057b31a

Browse files
committed
Set up Procfile and Puma config
1 parent eb956ac commit 057b31a

File tree

3 files changed

+21
-25
lines changed

3 files changed

+21
-25
lines changed

.idea/workspace.xml

Lines changed: 3 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Procfile

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

config/puma.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,20 @@
4141

4242
# Allow puma to be restarted by `rails restart` command.
4343
plugin :tmp_restart
44+
45+
46+
workers Integer(ENV['WEB_CONCURRENCY'] || 2)
47+
threads_count = Integer(ENV['RAILS_MAX_THREADS'] || 5)
48+
threads threads_count, threads_count
49+
50+
preload_app!
51+
52+
rackup DefaultRackup
53+
port ENV['PORT'] || 3000
54+
environment ENV['RACK_ENV'] || 'development'
55+
56+
on_worker_boot do
57+
# Worker specific setup for Rails 4.1+
58+
# See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot
59+
ActiveRecord::Base.establish_connection
60+
end

0 commit comments

Comments
 (0)