2014-01-16 46 views
1

當Capistrano的部署和使用它來啓動彪馬服務器你只包括require 'puma/capistrano',它並使用cap deployCapistrano的與彪馬,配置

但我怎麼配置彪馬服務器的魔力是什麼時候?我的意思是,比方說,我想換多少工人,集羣模式等

解決方案:看到這個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 
+0

請確認添加了答案,因爲您已找到解決方案 – arun15thmay

回答

1

解決方案:在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