Everytime I deploy my redmine repository with capistrano my files are gone. I can see that capistrano symlinks the public directory, but not the {ROOT}/files directory.
I've read some articles on the internet but can't seem to get it work.
So I want is to keep my files in the {APP开发者_StackOverflow中文版ROOT/files} directory after a deploy
Many thanks for reading this.
You have two solutions:
1: Put your files
directory in public/shared
, which persists over the deployments.
2: Add a task in your capistrano recipe to create the symlink after each deploy:
task :create_files_symlink, :roles => :app do
run "ln -nfs #{shared_path}/files #{release_path}/files"
end
after 'deploy:update_code', 'create_files_symlink'
精彩评论