Hi there, we made a PHP and Impakt2 based web content management system
for schools with specific features that work really well for schools.
The way I designed it was so there was one central set of source code
and an empty (in terms of rows in tables) database structure. To set up
a new school i had a script that basically created a new directory in
/var/www and then within that, symlinked all of the application’s
directories from the central source folder (except the file_library
directory for obvious reasons). It would also create a copy of the
database with the same name as the root directory that it just made. The
database connection file would basically read the directory name and use
this to connect to the right database.
In this way we could clone many schools and only maintain one set of
source as long as rolled out database changes correctly (which we had a
script to do).
Now Impakt2 has become obsolite and we face re-writing the whole thing
and I’m thinking about Ruby on Rails:
My question is, is there a better way of setting up the central
structure of the application (other than the way I did it above) so that
the source is central but schools each have a seperate database (for
safety and security reasons). If you had for example 100 schools, you
wouldn’t want to be rolling out complete copies of the source to each of
the 100 seperate instances (on the same server).
I’d love to hear everyone’s suggestions as I really want to use Rails
but need to know that I won’t come unstuck right off the bat.