I have an MVC website that is connected to an azure web application and has continuous deployment to a custom website. It works great! After I sign up, a successful build is automatically deployed to the intermediate slot of my webapp. After I verified that this stage looks good, I can swap the two slots to make prod onto the stage and vice versa.
I recently decided that I want production and intermediate slots to connect to various databases so that I can enter test data on an intermediate site without cluttering the prod database.
I am naive, although I could have done this by editing the connection strings in the configuration for the staging site to point to the new database. It seemed like it worked, but the next time I changed the configuration after deployment, I realized that the connection strings are swapped in the process. This is not what I was striving for.
Does anyone know how I can have two deployment slots point to different databases and support these connections after the exchange? Is there any other way that I should think about this?
source share