mirror of
https://github.com/ubicloud/ubicloud.git
synced 2025-10-06 14:51:57 +08:00
Fixes issues in Puma when used with Heroku Router 2.0. See https://www.heroku.com/blog/pumas-routers-keepalives-ohmy/
17 lines
313 B
Ruby
17 lines
313 B
Ruby
# frozen_string_literal: true
|
|
|
|
# :nocov:
|
|
environment ENV["RACK_ENV"] || "development"
|
|
port ENV["PORT"] || "3000"
|
|
threads 15, 15
|
|
enable_keep_alives false
|
|
|
|
if @config.options[:workers] > 0
|
|
silence_single_worker_warning
|
|
preload_app!
|
|
|
|
before_fork do
|
|
Sequel::DATABASES.each(&:disconnect)
|
|
end
|
|
end
|
|
# :nocov:
|