To make a long story short, I need to build a simple dropbox clone to sync files with my server.
I did my homework, I did lots of research, but none of the solutions I found (both code and already baked solutions) seemed to be good enough.
I have read the other posts here on stackoverflow too, the only difference is that I need the sync task to be triggered on filesystem events. Also, git is already being used for real version control purposes, and I can't use it for this sync task.
Here's my setup:
I have a git repository on github and I do regular deployments with capistrano. Here's my problem: we have infrastructure and data implications which make it impossible to do real local development.
My code can exist locally, I can version it on github, but it needs to run on the server, even as I do development. In order to avoid cowboy development, I came up with this solution:
keep in mind that this is only for the front-end layer, which involves hundreds of tpl (html + smarty), css and js files *
The master branch runs for the public
- When logged in on our live app, developers can switch to "developer mode" and point to a different repository that exists on the server. This "ghost" repository is simply an exact replica of the developer's local working copy. It is kept in sync with the dev's local repo trough the dropbox clone.
That way, this can be our workflow:
- Developer does work locally on all the stuff
- Every time something is changed locally, the "ghost" developer repository is updated too and things can be tested on the server
- When the dev is happy with the results, he can then commit and push to the development branch
- When the team is ready for a new release, all the commits can be deployed trough capistrano
This way, the ghost repository of each developer is completely out of the picture when it comes to the git workflow (as far as git is concerned, these ghost repositories don't even exist, they are just a utility for the developer).
Given this (long!) premise, these are the features I would need:
- ability to sync over ssh
- trigger the sync on filesystem events (creating/updating/deleting files and directories)
- only syncing updates in rsync style (delta encoding), basically just differences
- possibly a cross platform (windows/mac) solution
Among the "already made" solutions:
- GoodSync
- Super Flexible File Synchroniser
- ChronoSync
Only GoodSync seemed to offer what I needed, but I couldn't make the auto update feature (sync on filesystem updates) work in any possible way.
Among the recipes I'd have to make myself, I've read about FSEvents, inotify (linux) + rsync options, but they may be a bit out of my league (I can do basic applescripts, probably not a lot with the FSEvents API or inotify)
So this is where I am at right now. I am open to any type of suggestion, and I thank you in advance for anything you may share on the subject.
Thanks!