23460 Posts in 18907 Topics by 2877 members
|Go to End|
13 February 2014 at 6:07am
I am trying to bend my mind around getting silverstripe to work in a Software as a service configuration where essentially there is one set of silverstripe files, but many databases and different themes, i.e.
all share the same SS3 core files (inc mysite) but each has a different theme, asset folder and database.
The purpose is so that when we upgrade the software (i.e. our modules within mysite, etc) then we only have to do it to one location and not to 100 different locations. We can the run a batch /dev/build command to update every site.
Do you think this is possible?
Thanks for any input!
13 February 2014 at 6:22am
This may not be an appropriate solution, but I thought it was worth a suggestion - could the subsites module do what you need? https://github.com/silverstripe/silverstripe-subsites
13 February 2014 at 6:26am
No unfortunately not, needs to be separate DBs for a number of technical and legislation reasons.
Another thought I had, would be to make exact copies of the site (i.e. all the files, copied from a core packaged zip that gets unpacked), then have some sort of "patch" or "package~ updater that (a lot like wordpress) downloads the latest edition, unpacks it, uploads the files and runs a dev/build. Has this been done in SS?
13 February 2014 at 11:48am Last edited: 13 February 2014 11:49am
I've not done anything like this, but we considered the SaaS approach for a previous project. The idea we had was to simply use our _ss_environment.php file to switch out which database and assets folder is being used based upon the current domain name. Something like:
$domain = getenv(DOMAIN_NAME); // 'setEnv DOMAIN_NAME www.sitex.com' in vhost config
13 February 2014 at 11:05pm
Cool - sounds good. We will extend this to do a DB look up to get the switch statement (as there are going to be 100s of accounts) then probably store it in a session so we dont have double hit the DB everytime. Didnt even know that existed! Going to help our dev process too.
|Go to Top|