Hi Richie,

    I use the next layout:
        RAILS_ROOT
             \- config/deploy.rb
                   \- deploy/
                         - stages (production.rb, staging.rb,...) if needed
                         - common_tasks.rb
                         \- templates/

    Then I have a config/deploy.rb where I put all my variables.
    In config/deploy/common_tasks you will find all the common logic (if 
not exists stages with different logic or variables).
    In config/deploy/templates you will find all my erb files to 
generate files, for example: database.yml, mailer.rb, ...

    Tomorrow I'll upload my default deploy template to github and put 
here the url.

Good night!
         
Richie Vos wrote:
> I've been doing a lot of config-management/capistrano work recently,
> and have found it incredibly useful to keep all my capistrano files
> together. I'm not sure if we came up with the layout we've used in the
> past, or if it's a normal capistrano thing, but we used to have a
> layout like:
>
> Capfile
> config/deploy.rb
> lib/capistrano/recipes/**/*.rb # recipes
> config/deploy/*.rb # stages
>
> Instead of doing that, what we've started doing is just putting
> everything in a top-level capistrano directory. I'm turning into a bit
> fan of this decision. It's really convenient since all the capistrano
> code is all right by each other, and also seems really clean since
> recipes and cap stages are a capistrano thing, and neither app code
> (which I'd put in lib) nor app configuration options (which would live
> in config).
>
> So our current layout is:
>
> Capfile
> capistrano/deploy.rb
> capistrano/recipes/**/*.rb
> capistrano/deploy/**/*.rb # stages using path'd stages from
> http://github.com/moneypools/capistrano-ext/tree
> capistrano/tasks/*.rb # custom tasks we create
>
> The only modification to get this to work is updating the Capfile:
> load 'deploy' if respond_to?(:namespace) # cap2 differentiator
> Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
> load 'capistrano/deploy' # was load 'config/deploy'
>
> I'm a big fan of this and am curious as to what others think about it,
> and if this is something that'd be considered for the default
> capistrano layout.
> >
>
>   


-- 
Rafa


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.co.uk/group/capistrano?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to