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
milo
milo3y ago
that’s currently not possible
Stibnite
StibniteOP3y ago
Ah, okay. I understand that there is no built-in solution, but is there a workaround?
demo
demo3y ago
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
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Stibnite
StibniteOP3y ago
@Geolocating Shark I'll consider that 😄
angelo
angelo3y ago
@Stibnite - would something like a deploy order help?
Stibnite
StibniteOP3y ago
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?
angelo
angelo3y ago
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.
Stibnite
StibniteOP3y ago
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?
angelo
angelo3y ago
Exactly this Right, one commit change to either each should trigger a new build for both is my guess.
Stibnite
StibniteOP3y ago
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
angelo
angelo3y ago
Then this leads back to the deploy order
Stibnite
StibniteOP3y ago
Is there an article about it?
angelo
angelo3y ago
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.
Stibnite
StibniteOP3y ago
Yeah, that would be helpful
angelo
angelo3y ago
Bingo! Will talk to our team about this then.
angelo
angelo3y ago
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.
Stibnite
StibniteOP3y ago
Done!
angelo
angelo3y ago
I see it!
Stibnite
StibniteOP3y ago
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?
angelo
angelo3y ago
That would work in the meantime
Stibnite
StibniteOP3y ago
Wait, no. The bot would be up because the Rails service is already up Nevermind, it won't work
Want results from more Discord servers?
Add your server