Setting variables during deploy?
zohar
TRIALOP

a year 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

a year ago

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


a year ago

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


a year ago

!s


Status changed to Solved brody about 1 year ago


Loading...