2 years ago
Hello, I currently have my DNS records pointing directly to my Next.js application. I now want to update my records to point to a Caddy proxy.
Ideally I'd like to make the DNS switch with 0 downtime, but I can't have "mydomain.com" on both the Next.js and Caddy application in Railway.
Is there a recommended approach for achieving this on Railway?
9 Replies
2 years ago
b7ffa58d-4fc3-417f-8ad8-ffc29078d847
2 years ago
how to make a DNS switch with no downtime? don't switch DNS in the first place!
you currently have a service running NextJS with the custom domain, so simply deploy the caddy application into that same NextJS service, provided you set everything else up correctly, there's going to be no downtime.
2 years ago
Hmm, I'd prefer to keep Caddy as a separate service.
I have an approach, but I just wanted to check if there was something simpler. Thanks for the reply though! 🙂
2 years ago
you would keep them as separate services, you misunderstood, but glad you came up with your own solution
2 years ago
Ahhhh, I did misunderstand - your approach makes sense if I'm understanding you correctly: So you're saying duplicate the Next service, and then replace the original one (which has the custom domain) with the Caddy proxy?
2 years ago
yep!
2 years ago
Ah amazing! Thanks Brody 🙂
2 years ago
no problem
2 years ago
!s
Status changed to Solved brody • over 1 year ago