Forum: Ferret Ferret and capistrano, how to keep the indexes?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
mike (Guest)
on 2007-06-15 17:21
Hi, i'm using capistrano to deploy the application, but every time i
deploy it change all the directory, so i lost also the ferret's indexes.
Is it possible to keep them in order to prevent the reindex on each
deploy?
John L. (Guest)
on 2007-06-15 17:33
(Received via mailing list)
sure, put the ferret index directory in the capistrano shared directory,
and have capistrano symlink it in.  The same way the log/ and tmp/
directories are handled.

John.

On Fri, 2007-06-15 at 15:21 +0200, mike wrote:
> Hi, i'm using capistrano to deploy the application, but every time i
> deploy it change all the directory, so i lost also the ferret's indexes.
> Is it possible to keep them in order to prevent the reindex on each
> deploy?
>
--
http://johnleach.co.uk
Alain R. (Guest)
on 2007-06-15 18:36
(Received via mailing list)
> sure, put the ferret index directory in the capistrano shared directory,
> and have capistrano symlink it in.  The same way the log/ and tmp/
> directories are handled.

Example:
In my deploy.rb file, I added (edited) :

   desc "Set up the shared index"
   task :after_setup, :roles => [:app, :web] do
     run "mkdir -p -m 777 #{shared_path}/index"
   end

   desc "symlink the index"
   task :after_update, :roles => [:app, :web] do
     run "ln -nfs #{shared_path}/index        #{current_release}/index"
   end

Alain
This topic is locked and can not be replied to.