Jump to:

22975 Posts in 11620 Topics by 2826 members

General Questions

SilverStripe Forums » General Questions » Publish live content to multiple remote live servers

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 439 Views
  • tazzydemon
    Avatar
    Community Member
    114 Posts

    Publish live content to multiple remote live servers Link to this post

    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

  • tazzydemon
    Avatar
    Community Member
    114 Posts

    Re: Publish live content to multiple remote live servers Link to this post

    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.

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: Publish live content to multiple remote live servers Link to this post

    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.

  • tazzydemon
    Avatar
    Community Member
    114 Posts

    Re: Publish live content to multiple remote live servers Link to this post

    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?

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: Publish live content to multiple remote live servers Link to this post

    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.

  • tazzydemon
    Avatar
    Community Member
    114 Posts

    Re: Publish live content to multiple remote live servers Link to this post

    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!!

    439 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.