mirror of
https://github.com/CodeforLeipzig/stadtratmonitor.git
synced 2024-12-22 23:53:15 +01:00
use puma
This commit is contained in:
parent
22ace44a71
commit
22d180c38d
2 changed files with 17 additions and 1 deletions
2
Procfile
2
Procfile
|
@ -1 +1 @@
|
||||||
web: bundle exec rails server -b 0.0.0.0 -p ${PORT:-3000}
|
web: bundle exec puma -C config/puma.rb
|
16
config/puma.rb
Normal file
16
config/puma.rb
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server
|
||||||
|
workers Integer(ENV['WEB_CONCURRENCY'] || 2)
|
||||||
|
threads_count = Integer(ENV['RAILS_MAX_THREADS'] || 5)
|
||||||
|
threads threads_count, threads_count
|
||||||
|
|
||||||
|
preload_app!
|
||||||
|
|
||||||
|
rackup DefaultRackup if defined?(DefaultRackup)
|
||||||
|
port ENV['PORT'] || 3000
|
||||||
|
environment ENV['RACK_ENV'] || 'development'
|
||||||
|
|
||||||
|
on_worker_boot do
|
||||||
|
# Worker specific setup for Rails 4.1+
|
||||||
|
# See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot
|
||||||
|
ActiveRecord::Base.establish_connection
|
||||||
|
end
|
Loading…
Reference in a new issue