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.
Aa9c8aff95b1d8eb91ba15adc3e42802?d=identicon&s=25 mike (Guest)
on 2007-06-15 15: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?
28c237c0c414b644082bfcde4e42b309?d=identicon&s=25 John Leach (Guest)
on 2007-06-15 15: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
Cdff2cc7b20bc42b9e43520091c576df?d=identicon&s=25 Alain Ravet (Guest)
on 2007-06-15 16: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.