Does anyone have experience with using one copy of SS (either 2.4 or 3.x) as a staging server but when the live publish is done, the data and assets are pushed to a remote live server, possibly more than one.
Julian
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Does anyone have experience with using one copy of SS (either 2.4 or 3.x) as a staging server but when the live publish is done, the data and assets are pushed to a remote live server, possibly more than one.
Julian
No replies?
By the way I know how to sync the assets with rsync etc, but to push the db changes is another deal, which with no port 3306 access generally allowed, would require some sort of bridge class on the receiving end. I just wonder if anyone has done it.
Closest I've setups I've done is had 1 machine as the CMS, containing the database / assets and the webservers with caches / copy of the templates. Asset folders on 3 of the webservers were mounted to the cms server (so no need to propagate anything (as they were in 1 place) and the database stayed on the same server.
If you're not worrying about the database (and using something like static publisher) then pushing the site out to multiple boxes is a snap. If the boxes are hosted on the same network then I image you could setup the firewall to allow mysql connections between the machines.
I'm not quite sure yet but my feeling is that this user will close port 3306 for security reasons so I have to find another way of pushing the data. That's why I was hoping somebody had done it before.
It's all on Centos so rsync will get the assets over but since the DB also contains asset references I really have to push the entire DB contents or somehow track the changes. Thats why I was hoping someone had one it before.
I have been playing with a product call eMagicOne to administer Virtuemart Stores on Joomla. It's very handy and offers an http or php bridge (via a php file on the target server) to get the data uploaded (or downloaded). I see this as being a possible route for Silverstripe replication.
Is there a hook like onBeforeWrite() for publishing so I can tie into that?
See onAfterPublish - http://doc.silverstripe.org/framework/en/topics/versioning.
If you're gonna run separate database installs (rather than 1 dedicated mysql server) I assume you won't have forms on your website? Since then you'll run into all sorts of issues. If you're not using forms or user changable content on the front end you might as well just use static publisher.
You're quite right and with this client I'm not sure yet. There are certainly going to be fairly active things on the site but replicating the db will mangle form input. That leaves me if I'm desperate just rsyncing assets and added just the db changes. But how? Just syncing the site tree and subclass tables plus assets. Messy. This is why I was hoping it has been done already!!