We have multiple locations (2 now, soon to be 3) with ProxMox servers that have containers (ubuntu server) on them set up as the following (but will have more web servers):
Location 1:
- GitLab-server
- db-server
- rproxy
- web-server-1
- web-server-2
Location 2:
- db-server
- rproxy
- web-server-1
- web-server-2
We have the db-servers set up as multi master using galera on MariaDB, so they are not an issue. When we deploy, we want to deploy to Location 1 (where the GitLab server is) and have it sync across to Location 2 on the same webserver there (and any more Locations in the future). We will be using Symfony for inhouse solution development, and possibly other services like flarum for forums.
There is a reverse proxy server that sends the correct subdomain.domain to the correct LAN IP and directs all traffic from http to https as well as dealing with letsencrypt certs. I have also created a ddns solution that connects to an online cpanel server to update dns for dynamic dns locations and in the case of a failover (the only time anything after site one will be used is in the case of an outage at site 1)
Originally we were thinking use Resilio Sync to sync the project (/var/www/html/) directory between them, but then it will loose permissions and we need to make sure there are not constantly changing files that will cause syncs (with symfony we can move them out of the sync folder as they will not need to be synced in an update normally).
If it was only one server we would look at using rsync over ssh if that port was not used elsewhere, but we don't want to have to set up complex port forwarding every time we add a new web server. Resilio doesn't need port forwarding, so would be great except for the permission issues. Im guessing we can't really do it over https (because the website is running on that port).
Any suggestions?