【发布时间】:2014-01-16 21:06:06
【问题描述】:
使用 Capistrano 部署并使用它来启动 puma 服务器时,您只需包含 require 'puma/capistrano',它在使用 cap deploy 等时会发挥作用。
但是我该如何配置 puma 服务器呢?我的意思是,假设我想更改工人数量、集群模式等。
解决方案:在 puma/capistrano.rb 中找到了这个
def config_file
@_config_file ||= begin
file = fetch(:puma_config_file, nil)
file = "./config/puma/#{puma_env}.rb" if !file && File.exists?("./config/puma/#{puma_env}.rb")
file
end
end
所以我想我可以在那个目录中放一个配置文件就可以了。
/config/puma/production.rb
【问题讨论】:
-
请添加答案,因为您已经找到了解决方案
标签: ruby-on-rails nginx capistrano puma