a year 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
a year ago
b7ffa58d-4fc3-417f-8ad8-ffc29078d847
a year 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.
a year 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! 🙂
a year ago
you would keep them as separate services, you misunderstood, but glad you came up with your own solution
a year 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?
a year ago
yep!
a year ago
Ah amazing! Thanks Brody 🙂
a year ago
no problem
a year ago
!s
Status changed to Solved brody • over 1 year ago