Sync two deploys
Hello,
I've got a Rails app, a Sidekiq worker, and a Discord bot.
They are all dependent on each other. I want them to deploy together at the same time. If one of the deployments fail, other should too.
How can I do that? I've got a basic health-check but it works for the specific service only.
23 Replies
that’s currently not possible
Ah, okay. I understand that there is no built-in solution, but is there a workaround?
put the code for them in a monorepo so when you deploy one they all deploy
actually nvm i read the whole thing
that is not relevant for ur usecase to have one stop the rest
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
@Geolocating Shark I'll consider that 😄
@Stibnite - would something like a deploy order help?
Not really. The node.js service is highly associated with the Rails web app. They should be deployed together, not in order. But maybe that could help somehow?
Okay, then I would say a monorepo with a healthcheck would be the way to go.
The monorepo will trigger both builds at the same time.
The healthcheck would enforce that they are all online at the same time or fail.
How would I do that? Monorepo would trigger the deployment of the two services but their healthchecks are independent, right?
Or am I not seeing something?
Exactly this
Right, one commit change to either each should trigger a new build for both is my guess.
Yeah, but they won't "deploy" at the same time. If one service builds faster, then it will be deployed faster
That's my issue. I need the versions synced
Then this leads back to the deploy order
Is there an article about it?
No, its not a feature yet, hence why I am asking about the usecase.
If its a matter of:
I need Service A to be ready before Service B is built/online.
Then we can bake this in to a feature we have.
Yeah, that would be helpful
Bingo!
Will talk to our team about this then.
In the meantime: can ya post this in https://feedback.railway.app I dont want this convo to get lost.
Railway Feedback
Give feedback to the Railway team so we can make more informed product decisions. Powered by Canny.
Done!
I see it!
I wonder - what if I set up the faster service health-check to ping the slower service endpoint health-check endpoint? 🤔
The node.js bot would ping the Rails service as a health-check.
The Rails service would have it's own health-check (returning 200 on
/healthcheck
)
I would have to tinker with the timeouts but that could work?That would work in the meantime
Wait, no. The bot would be up because the Rails service is already up
Nevermind, it won't work