aboutsummaryrefslogtreecommitdiffstats
path: root/config/puma.rb
blob: fa22c6b45acf421f42cba55ba5d8f0a1f59f1341 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
_rails_root = File.expand_path("../../", __FILE__)

directory _rails_root

_log_file = File.join(_rails_root, "log", "puma.log")
stdout_redirect _log_file, _log_file, true

pidfile File.join(_rails_root, "tmp", "pids", "puma.pid")

threads 4, 16
workers 2

bind "unix://" + File.join(_rails_root, "tmp", "sockets", "puma.sock")
port 3000

on_worker_boot do
  ActiveSupport.on_load(:active_record) do
    ActiveRecord::Base.establish_connection
  end
end

preload_app!