Hello,
I am wondering what is the best practice for publishing new sites that currently already exist on another server with an existing domain, with minimal downtime.
This is how I do it:
- Spin up a new droplet on DO
- Change the hosts entry in trellis/hosts/production
- Change the group vars to resemble the existing domain
- Provision the server
- Deploy to server
- Change the local /etc/hosts file to fake the DNS and point the old domain to the new DO droplet IP without changing the domain itself
- Check if everything is OK
- Point the old domain to the new server
All things considering, this should work. I am not getting any errors on provision or deployment, but when I try to open the site in the browser i get a net::ERR_TOO_MANY_REDIRECTS