I have a Gallery-style app that has been already deployed. My local version has many photos that I use only for local testing, and I absolutely do NOT want them to overwrite my real photos which are online.
I also have a git repository which only tracks my code and ignore photos.
When I type cap deploy:migrations does it use my git repository or not? i.e. does Capistrano will overwrite my online photos with local ones, or it will ignore them because git ignore them?
Simply put your photos in capistrano’s shared folder and symlink it. To automate it, write a capistrano recipe like:
This recipe will create a pictures folder in capistranos shared folder on ‘cap deploy:setup’ and symlink it on each ‘cap deploy’.
So if you already have created the pictures folder on the server and added some pictures, you may migrate it before run the command:
I use another recipe for sync the contents of shared folders over several machines, you can get it from GitHub