Wait for another service to build before deployment
jirkavrba
HOBBYOP

a month ago

Hello, I was wondering whether Railway supports a way to link "dependencies" between services. My case is that I'm running a ecommerce website where I have a server and a storefront. I deploy both of those from monorepo and when I push to the deployment branch, both services start build at the same time. However, the storefront depends on the server to be upstream and responding and it just happens to fit in the time frame when the server is starting.

Is there a way to configure the storefront service to wait for the server service to build and deploy?

Thanks a lot

$10 Bounty

3 Replies

a month ago

Hey, I hope that I am not hallucinating or making this up, I believe that Railway actually has some sort of dependency order for service deployments based on reference variables (for example if you have a database and a backend referencing the database, with both of them building and deploying at the same time, then the database would be the first one to be deployed).

Regardless, I would actually recommend setting up healthchecks, so that you have 0 down time deployments, which means that this won't be an issue to begin with. https://docs.railway.com/reference/healthchecks


a month ago

Doesn't happen on git pushes though


armsgora
PRO

a month ago

Would also love to have this feature


Loading...