Railway CLI deploys with service variables
polalalar
FREEOP

a month ago

With each release of my code (on github) it automatically sends 2 requests to the railway CLI, one to update the service variables, and one to start running the new code. By doing so, the old version is first rebuilt, because the secret variables are sent first.

Is there a way to prevent this from happening, and only deploy the new version with the new service variables?

p.s. code is below.

           bot_version="$BOT_VERSION" \
           version_name="$VERSION_NAME" \
           version_description="$VERSION_DESCRIPTION"
         
         railway up --service Production \
           --message "$BOT_VERSION"```
Solved$10 Bounty

4 Replies

polalalar
FREEOP

a month ago

Thought about updating the project first and then the service variables, but i'd expect the new version would then be built twice, once with the old service variables and once with the new ones.


You can add the --skip-deploys flag to variables set to stop the service from being redeployed from the variable change.


polalalar
FREEOP

a month ago

tysm, i guess i read over that one 😓


no problem :)


Status changed to Solved 0x5b62656e5d 28 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...