We have a system where we use a bespoke CMS on one of our servers. This CMS is used by 30-40 clients. The majority of the files for each client CMS are the same (apart from a few folders)as each time we add a new feature / patch / bug fix we roll it out to all clients. We want to consolidate these files into a single place so we can deploy our changes to it from SVN more easily.
we have a structure like this for each user account:
/home/user/public_html/css/
/images/
/admin/
index.php
etc ....
In this example, the css and images folders would be unique to each client site but all other files would be common to all. Not sure if we should be looking into symlinks / NFS / something else ??
Short term solution:
Move
to, say,
/opt/cms
Create sym-links for the files to the new location. ie:
Writing a script to do the above for all the files and all the user's should be trivial (with experience). If not, post a separate question.
Then use SVN in the /opt/cms directory, which is linked to by everyone.
Longer term solution:
Eliminate the user directories completely. Move the application into one single website location (/opt/cms or /var/www/cms, etc...). Use some sort of URL rewriting to make
example.com/~user/images/*
point toexample/user/images/*
and make a/opt/cms/user/images
directory for each user. This solution means user's don't know anything's changed.Longer term, re-write the CMS to store the difference behind the scenes, or make a new structure and give the users a new URL.
I'm not familiar with Bespoke's file layout, but have you thought of doing this via the svn:externals property?
It allows you to link an 'external' repository to a location inside your current repository. By having a central repository where Bespoke lives (private for your organization, or the public repos if they offer one) linked to all your project repositories, it will make rolling things out with SVN a snap.
When you run svn update or svn commit inside of a location in your repos, the changes will be pulled or pused to the external repos and keep everything in sync.
svn:externals only supports folders prior to version 1.5, so be sure you're on 1.6 or higher so you can link things like the index.php to your project properly (unless bespokes files can be placed in a single directory).