mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-14 13:16:28 +08:00
15 lines
475 B
Ruby
15 lines
475 B
Ruby
workers Integer(ENV['WEB_CONCURRENCY'] || 2)
|
|
threads_count = Integer(ENV['MAX_THREADS'] || 5)
|
|
threads threads_count, threads_count
|
|
|
|
preload_app!
|
|
|
|
rackup 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
|