Hi all, I’m not sure if this is the correct category for my question but I’ll try.
We run two geographically distant webservers, connected over OpenVPN, they both host some WP sites.
Some of those sites are in common this means that the are deployed to both servers and can be used e.g. using haproxy. In order to have the same data on both sides we’ve setup MySQL Master-Master replication, for files I’ve just installed GlusterFS which works fine.
brick1 is shared between the two servers via GlusterFS so what I write/delete on one site is replicated to the other, mutual. As you can see the idea is to keep uploaded stuff in this folder, how can I tell bedrock deployed WP sites that they should use such folders? The original upload folder in our setup for e.g. site1 is in:
/var/www/vhosts/site1/shared/web/app/uploads/
I was also considering symlinking but maybe there’s a better solution.
Thanks in advance for support,
This already exists by default. Easiest solution is to just make your GlusterFS dir be at /srv/www/site1/shared/uploads (or whatever the path is) and it would just work.
which should work. Has this symlink set to be inside my project (git), in Capistrano deploy.rb or should I set it e.g. using ansible provisioner? Thanks.
and committed this to git, then deployed. It works fine but in local dev I loose uploads/.gitkeep as far as uploads was a directory before inside the git repo, now it’s a symlink.
Is this OK according to you? Locally uploads points to nowhere but It’s not important as far as we develop in share paths mounted inside Vargrant boxes which then have set /mnt/glusterfs/gvol0/brick1/uploads/site1 as it should.