1

I have a django app and I am deploying it using Heroku pipeline. I am trying to understand what's the best way to handle the fact that each staging apps should not use production databases (right?)

What's the best way to do so? It seems that I can't set env variable that are "phase" specific (can i?)

giaggi
  • 542
  • 5
  • 16
  • production db is just for your production django app. Is your question: How to have a db cooy of prod for any environment (testing, stagging, etc) ? – JRichardsz Dec 05 '21 at 03:24
  • exactly. Currently my production DB is defined through a env variable. If i put that env variable to ALL apps it will be referenced also in staging. I am not sure how I can set env variables that are arestricted to specific phase of the pipelines though. And i would like to avoid having to manually set a staging db evn variable EVERY time i deploy to staging. Does it make sense? – giaggi Dec 05 '21 at 05:34

1 Answers1

0

Looks like Heroku takes care of spinning up databases for the testing app on its own so I can close this one.

giaggi
  • 542
  • 5
  • 16