redeploy service from railway cli?

title
27 Replies
TheRuminator
TheRuminator2mo ago
dont close
Brody
Brody2mo ago
the cli doesn't have this functionality, do you think you could share your usecase, maybe I would be able to come up with an alternative solution
TheRuminator
TheRuminator2mo ago
Okay. I have a discord bot running it fetches information from reddit and sends to discord, occasionally reddit will return an error, which my code isn't handling at the moment. The error interrupts the info stream to discord. While i figure out how to handle the error properly and investigate it with reddit, I've found that simply redeploying resumes the bot functionality. So i just needed it to be redeployed easily and cli seemed faster to me had there been a single command, just more clicks on the website
Brody
Brody2mo ago
gotcha, how were you planning to automate the restart?
TheRuminator
TheRuminator2mo ago
Just hoping there was a command like "railway redeploy" or something
Brody
Brody2mo ago
right but where would you be running that command from?
Jack
Jack2mo ago
Probably more beneficial or productive to work in error handling than designing a function (on another client?) to monitor it and redeploy it every time. I don’t disagree with doing a lot of things, but this just seems like a waste of time compared to prioritizing error handling.
Brody
Brody2mo ago
I'm in major agreement with jack, but if you want to go down the route of just restarting the service, you would need to use Railways public API
Jack
Jack2mo ago
Even so, if you wanna share the function snippet that’s not being handled, I’d be happy to look at it for you and see what I can do.
TheRuminator
TheRuminator2mo ago
From my terminal? Yeah i agree, this was just in the meantime while i get time to work on that code Gotcha Don't you think redeploy should be a functionality in the cli though? Also, what's the difference between a redeploy and restart
Jack
Jack2mo ago
Why not redeploy it on the site then?
TheRuminator
TheRuminator2mo ago
Would be faster through the cli Multiple clicks required on the website
Jack
Jack2mo ago
Redeploy will pull the image again in another deployment (I believe) while restart will just restart your current deployment.
TheRuminator
TheRuminator2mo ago
I see
Brody
Brody2mo ago
I mean, so far the usecase is to get around improper error handling, so that doesn't bode too well as a reason to implement such a feature
Jack
Jack2mo ago
In your case, you’d just need to restart it.
TheRuminator
TheRuminator2mo ago
Nah, like outside of that Thanks
Jack
Jack2mo ago
Not a horrible idea for the future and expansion of the cli, but not a priority either.
Jack
Jack2mo ago
Feel free to put that in #🤗|feedback or open a feedback thread on https://help.railway.app/feedback
Railway Help Station
Railway Help Station
Discuss Railway with other developers
TheRuminator
TheRuminator2mo ago
Yeah for sure. If its an interface, it should mirror most functionalities as on the website Thanks Curious to know why the disagreement on this? @Brody @Jack
Jack
Jack2mo ago
The cli is not an interface, it’s designed to make CI/CD possible and allow developers to integrate things like local development and remote deploys. It’s not designed or upheld to be an alternative to the website or interface in any way.
TheRuminator
TheRuminator2mo ago
I see
Jack
Jack2mo ago
The cli is open source in addition, so feel free to also provide any feedback there for maintainers or community members to see, but unless there’s popular interest in something, it’s likely to get pushed away.
Brody
Brody2mo ago
took the words off of my keyboard
TheRuminator
TheRuminator2mo ago
Good to know!
maddsua
maddsua2mo ago
nah let's just add one more command. more features is better 😁
Solution
Brody
Brody2mo ago