ruby on rails - Capistrano configuration -
 I have some problems with the variable scope with the multistage module of capistrano-ext mani. I currently,  Config / deploy / staging.rb . Set the settings ["domain"]: user, settings [set]: set [set]: Set the [[set]: [Set] [Setting ["domain"] [Setting: "config / deploy.yml" Setting: "user"] role: ap, domains role: web, domains role: db, domains,: set = "set", "set", "set" & Gt; True   
 My  config / deploy / production.rb  file is similar. It does not look very dry ideally, I think everything should be in the deploy.rb file. If there is a variable set with the current step, then everything will be really clear. 
Update: I got a solution.
 I set this function to  deployed rb : 
  def set_settings (parameters) parameters. K, v | Set k.to_sym, v if end exists? : Domain role: app, domain role: web, domain role: db, domain,: primary = & gt; Right end end    Then my  staging.rb  file bus  set_settings (YAML.load_file ("config / deploy.yml") ['staging']  
You are making it extremely complex.
Just your Enter the normal code in your deploy.rb file:
  role: app, domain role: web, domain role: db, domain, primary =>   And your step-dependent settings in your config / deploying / staging. Rb, production, rb, etc.
Then deploy the cap, as you said: cap staging deployment
Your stage. Rb files can also use normal variables. For example, there is only one line in my staging file: / P>
Set: deploy_to, "/ var / www / # {domain} _staging"
The rest are in deployment.
Comments
Post a Comment