Setting variables during deploy?
zohar
TRIALOP

2 years ago

I'd like to run a command only on the first deployment of an app (initializing DB).

On subsequent deployments I'd like to avoid reseting the DB.

I could do it with a check on the app side, but it feels better to use an ENV variable that will be TRUE on the first deployment, then FALSE later on.

This way it will be easy for me to manually set the variable to TRUE if I wanted to reset the DB on any future deployment.

So I'm looking for a way to set a variable during the deployment phase.

(context: thinking of a template that initializes the app on a first deploy but skips this step going forward)

Solved

3 Replies

zohar
TRIALOP

2 years ago

665700e5-7078-4a17-bd42-00e3b59c1a0f


2 years ago

this is something you'd need to do yourself, like checking for the existence of a file on a volume


2 years ago

!s


Status changed to Solved brody • over 1 year ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...