9 months ago
Hello,
Is there a way to have services marked as dependent on others, so they don't deploy until all is ready?
IE:
Service A depends on service B. So, if I am deploying both, service A should never deploy without service B health check passing for the new deployment as well. But, if I am only deploying service B, it can be deployed as soon as the health check for itself is good.
Sorry if this is already answered, I couldn't find anything in the docs or in this discord, but might not be searching by the right term for it.
8 Replies
Hey there- we do this automatically if you use environment variables to reference other services: https://docs.railway.com/guides/deployment-actions#startup-order
Awesome, I love that! Reading the docs, it seems like it's mostly just for the initial deployment. Is there a way to do this for every new deployment that comes out of github?
Are you asking because of backwards incompatible changes?
Because if both services are up, we have zero downtime deploys. So if service A and B are deployed as part of the same commit, even if B comes online first there’s still an instance of A running from its previous deploy
Yes, mostly if there is a breaking change, or we are running a migration, we wouldn't want service A to be deployed with the updates before service B is running with those same changes
That makes sense. Unfortunately we don’t support that right now. To be able to do that we’d have to group them in the same change and I think they’re distinct atm.
Ya, that makes sense. Probably would need to build a custom CI for this then, so maybe we will push it down the road. Or change rules for our deployments in the mean time to always have backward support and remove the old API in a future change.
Thanks for your time. We will finally have everything on Railway this week (Except Supabase) 🎉
9 months ago
!s
Status changed to Solved brody • 10 months ago