Guerrilla
Guerrilla

Reputation: 14916

AppServices won't allow ":" in setting name but needed for linux env var

I have published my linux container to App Services for Containers.

The way my container works is that it reads settings like API keys and connections strings from environment variables inside the running container.

I found a stack overflow post that says to set the env vars I need to use the "App Settings" in Azure. The problem is all the env vars have a colon in them, like:

database:connectionString=myConnectionString

App Services will not allow me to set a key that has a colon in it, however this is a perfectly valid syntax for a linux environment variable.

I really don't want to inject passwords during the build process into the actual image as that could cause a lot of issues.

How can I set an env var in App Services for containers that has a : in the key?

Upvotes: 1

Views: 724

Answers (1)

George Chen
George Chen

Reputation: 14334

You could set your connection string, however : should be replaced by __(i.e. double underscore).You could find this from this doc. This principle is for Linux App.

Hope this could help you, if you still have other questions,please let me know.

Upvotes: 2

Related Questions