#Deployment to Azure, using Azure environment variables for database?

6 messages · Page 1 of 1 (latest)

shy forge
#

So I am having to deploy into Azure for this project. After we finally have most things working it looks like I have been supplied Azure environment variables to use for the database connection. What is the best way to use these as I know by default the .env file is not tracked by git and is usually the place to store this info. Should I modify the database config and throw a bunch of ifs in there to see if the azure stuff is set and use that if so?

glossy apex
#

It should just work, any env-variables set in the environment will override the ones in .env

#

I.e. your config file still references env('DB_PASSWORD') etc

#

I mean, assuming you do set these as environment variables in App Service (or whatever Azure service you're using).

shy forge
mint topaz