forked from rubber/rubber
-
Notifications
You must be signed in to change notification settings - Fork 0
Extending
Matt Conway edited this page Jan 19, 2012
·
6 revisions
It should be safe to edit the generated files because the rails generate script will warn of conflicts on subsequent runs, and allow you to perform a diff for resolving the conflict. However, for deployment scripts, there is a lot you can do by tying into the existing process flow by using the capistrano before/after mechanism. For example,
after "rubber:install_packages", "custom_install" before "rubber:install_packages", "custom_install_web" # run for all roles task :custom_install do sudo_script <<-SCRIPT run_cmd other_cmd ! cmd_that_can_have_non-zero_exit SCRIPT end # only run for web roles task :custom_install_web, :roles => :web do put(File.read("local/file"), "/some/file") end
If anyone has any configuration templates similar to what is provided in generators/vulcanize/templates, please contribute them to the project, e.g. a module for using postgres instead of mysql, etc.