How to deal with automatic capistrano symlinks and docker volumes
before, I ran the
cap production deploy command and it connected to ssh, git cloned my project, created all symlinks for my shared folders between releases and executed my custom tasks.
The automatic symlinks were looking like that and depended each time on the deploy_to path:
ln -s /home/railsproject/releases/20150105144249 /home/railsproject/current
ln -s /home/railsproject/shared/public/uploads /home/railsproject/current/public/uploads
Now, I’ll use a docker volume so files will be in different folders in my docker host but will always be in the same folder on different docker containers:
ln -s /var/www/releases/20150105144249 /home/railsproject/current
ln -s /var/www/shared/public/uploads /home/railsproject/current/public/uploads
How can I override the way capistrano is making its symbolic links so I’ll always use my base folder
/var/www/ to create symlinks even if capistrano will publish to
/home/railsproject folder ?
Maybe do you have a better way to create those symlinks or simply something else in mind ?