1

Is it possible to set azure app service application settings (especially env variables) via deployment? We are using local git repositories to deploy our NodeJS application to different azure appservices. There are several environment variables required to run the application. I'd like to know if there is a way to insert those automatically while deploying the application so I do not have to set them manually for each application. If its possible how does azure handles changes in the environment settings if I changed a variable afterwords? For example if I have sensitive data that I have to enter after deployment directly into the env variable?

Here's an example. Variables: Name=InitialValue

VAR_1=Test1234
VAR_2=Hello World
USERNAME=
PASSWORD=

USERNAME AND PASSWORD need to be empty an filled afterwords directly via azure portal. Now I redeploy. What happens to my USERNAME and PASSWORD entries? What happens if I change the value of VAR_1? In this case I'd like to have the environment variable changed.

1 Answer 1

1

In azure app service the environment variables can be set via Application Settings > App Settings.

It has a 'key-value' format where you can enter the variable name and its value.

Then in the code you can read them as "process.env.Username " and so on.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.