Thanks, very helpful.
On Mar 19, 10:23 am, Jean-Philippe Moal <[email protected]>
wrote:
> François Montel a écrit :
>
> > Thanks, Ian and Jean-Philippe, very helpful input that sets me on
> > track.
>
> > Is there any advantage to using deploy:update (other than the rollback
> > option) as compared to just running a recipe that performs a git pull
> > (and whatever else I want to do when updating my code)?
>
> > For example, running deploy:update when there's a major version
> > release, but then a different custom recipe to only perform git pull
> > (etc.) when making minor changes/bug fixes.
>
> > Thanks. I'm just trying to understand how to make the best use of
> > capistrano.
>
> My main reason for always using the standard deploy recipe (with an entire
> clone/checkout/export/whatever) is that I want to be able to rollback any
> deployment, but your way is totally doable.
> If you write this kind of task you certainly will have to set the needed
> callbacks associated with the update_code task
> (seehttp://wiki.capify.org/index.php/Default_Execution_Path).
> As I use svn I also don't want to clutter my deployed directories with
> multiple
> useless .svn folders.
>
> If speed is your concern you could use remote_cache or fast_remote_cache which
> keeps a directory with a git clone which is updated when needed (not sure
> about
> the exact strategy).
> If storage space is your concern against the standard deploy task know that
> you
> can use deploy:cleanup. For instance we use it within a callback after:deploy
> in
> staging envs to avoid useless outdated deployed versions.
>
>
>
>
>
>
>
> > On Mar 19, 8:52 am, Ian Sheridan <[email protected]> wrote:
> >> Jean-Philippe is correct. You do NOT place static folders in your
> >> release directories. You need to place the UPLOADS folder (or any
> >> other folder like it that has static non-versioned files in it) in the
> >> "shared" directory. You then create a task that makes a new symlink to
> >> the UPLOADS directory.
>
> >> This flexibility is the heart and soul of Capistrano. You can get it
> >> to do anything that you would need at any stage in your deployment
> >> process. here is a sample task that creates a symlink:
>
> >> desc "create symlink"
> >> task :db, :roles => [:app] do
> >> send(run_method, "ln -nfs #{shared_path}/UPLOADS
> >> #{current_path}/public/UPLOADS")
> >> end
>
> Not sure why you are using a run_method var here, run "ln ..." also works
> fine :)
>
> Additionally you can have a :created_shared_directory(ies) with a callback on
> deploy:setup that creates the needed folders in the shared/ directory.
>
>
>
>
>
> >> Hope that puts you on the path to creating your own tasks.
>
> >> - Ian
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---