redeploy service from railway cli?
serpentinesr
HOBBYOP

2 years ago

title

36 Replies

serpentinesr
HOBBYOP

2 years ago

dont close


2 years 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


serpentinesr
HOBBYOP

2 years 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


2 years ago

gotcha, how were you planning to automate the restart?


serpentinesr
HOBBYOP

2 years ago

Just hoping there was a command like "railway redeploy" or something


2 years ago

right but where would you be running that command from?


2 years 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.


2 years ago

I don’t disagree with doing a lot of things, but this just seems like a waste of time compared to prioritizing error handling.


2 years 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


2 years 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.


serpentinesr
HOBBYOP

2 years ago

From my terminal?


serpentinesr
HOBBYOP

2 years ago

Yeah i agree, this was just in the meantime while i get time to work on that code


serpentinesr
HOBBYOP

2 years ago

Gotcha


serpentinesr
HOBBYOP

2 years ago

Don't you think redeploy should be a functionality in the cli though?


serpentinesr
HOBBYOP

2 years ago

Also, what's the difference between a redeploy and restart


2 years ago

Why not redeploy it on the site then?


serpentinesr
HOBBYOP

2 years ago

Would be faster through the cli


serpentinesr
HOBBYOP

2 years ago

Multiple clicks required on the website


2 years ago

Redeploy will pull the image again in another deployment (I believe) while restart will just restart your current deployment.


serpentinesr
HOBBYOP

2 years ago

I see


2 years 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


2 years ago

In your case, you’d just need to restart it.


serpentinesr
HOBBYOP

2 years ago

Nah, like outside of that


serpentinesr
HOBBYOP

2 years ago

Thanks


2 years ago

Not a horrible idea for the future and expansion of the cli, but not a priority either.


2 years ago

Feel free to put that in <#1157406325593096264> or open a feedback thread on https://help.railway.app/feedback


serpentinesr
HOBBYOP

2 years ago

Yeah for sure. If its an interface, it should mirror most functionalities as on the website


serpentinesr
HOBBYOP

2 years ago

Thanks


serpentinesr
HOBBYOP

2 years ago

Curious to know why the disagreement on this? @Brody @Jack


2 years 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.


serpentinesr
HOBBYOP

2 years ago

I see


2 years 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.


2 years ago

took the words off of my keyboard


serpentinesr
HOBBYOP

2 years ago

Good to know!


maddsua
HOBBY

2 years ago

nah let's just add one more command. more features is better 😁


2 years ago

sure sounds good to milo -


Loading...