Every time I upload images it goes to public/images/upload then when I run a cap deploy they get erased since it creates a new current directory.
How do I instruct Capistrano to move the files in public/images/upload to the shared/images/ then symlink those images to the current(new) release ?
after "deploy:update_code", "deploy:symlink_shared"
after "deploy:restart", "deploy:cleanup"
namespace :deploy do
task :restart do
run "touch #{current_path}/tmp/restart.txt"
end
desc "Symlink shared configs and folders on each release."
task :symlink_shared do
run "ln -nfs #{shared_path}/images/upload #{release_path}/public/images/uploads"
end
end