Replies: 2 comments
-
If you are hosting the Web API on Azure App Service, you can setup like below |
Beta Was this translation helpful? Give feedback.
0 replies
-
It should just work, make sure you use the docker run -it -v ".:/App/samples" --env-file .env -p 5000:5000 mcr.microsoft.com/azure-databases/data-api-builder --ConfigFileName ./samples/dab-config.json Also, docker doesn't like quotes or double quotes in the .env files, so make sure to specify your connection string without enclosing quotes:
I just tested it both with Powershell on Windows and bash on WSL/Ubuntu and had no issues |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm currently trying to use a .env file together with the dab-config.json in a docker container.
Since Azure recently published the option to use environments. I changed the dab-config.json by using the @env() syntax for the credentials. The credentials are stored in a seperate .env file in the same folder like the dab-config.
My problem is, that when I run following command it is loading only the dab-config.json. I don't know how to reference the .env file with docker. The command looks as follows.
sudo docker run -it -v ".:/App/samples" -p PORT:PORT mcr.microsoft.com/azure-databases/data-api-builder --ConfigFileName ./samples/dab-config.json
I tried to use --env-file with the path to the env file. I tried to add another command --ConfigFileName with path to the env file
I was following this blog: https://devblogs.microsoft.com/azure-sql/dab-envfiles//#comment-210
Beta Was this translation helpful? Give feedback.
All reactions