I have a build and release pipeline setup in Azure Devops, to build and deploy a ASP.NET Core app. The build pipeline creates a docker image of the app and pushes it to my Azure Container Registry. The release pipeline takes that docker image and publishes and start the docker container. I have stages for DEV, TEST, and PROD defined in the release pipeline, each with a unique set of appsettings.
In the past I used to do a token replace on the appsettings.json file, dependent on the release stage. But now with Docker in the mix, I'm at a loss what to do with those environment-specific appsettings.
I don't want to have to bake in all appsettings for every environment in the docker image. I also don't want to create environment-specific docker images. Both because I believe that the build artifact should be environment agnostic, and it seems counter-intuitive to the Azure Devops release stages configuration.
Can anyone suggest best practices for this particular problem, or point me in the direction of good documentation? Thanks!