We have Web.config.template which will generate web.config, whenever we build the project (I assume that imported Umbraco targets in csproj is doing this action).
Now I need to update the web.config to add some http handlers and modules. I will do it in web.config and Web.config.template files. Then we push the change (only Web.config.template get push without web.config) to Github and Azure DevOps will trigger CI and CD pipeline.
When CD pipeline deploy changes to Azure App Service, I don't see my changes (done in Web.config.template file). I need to manually update the web.config in Azure App Service.
The problem is that every time there is new change (even without config file involved) I need to redo the config changes manually. So, If I change a single cs file and deploy using CI/CD pipeline then my changes in Azure App Service web.config get overwritten and I need to manually do the update again.
How the deployment you guys doing for this scenario?
Hi @Ambert, the problem is that the repo is already configured like this so I thought it may be Umbraco recommendation as in the top of the file I see,
Azure Dev Ops Deployment, Azure App Service and Web.Config
We have a GitHub repo where we don't have web.config, means we have this in .gitignore file,
We have Web.config.template which will generate web.config, whenever we build the project (I assume that imported Umbraco targets in csproj is doing this action).
Now I need to update the web.config to add some http handlers and modules. I will do it in web.config and Web.config.template files. Then we push the change (only Web.config.template get push without web.config) to Github and Azure DevOps will trigger CI and CD pipeline.
When CD pipeline deploy changes to Azure App Service, I don't see my changes (done in Web.config.template file). I need to manually update the web.config in Azure App Service.
The problem is that every time there is new change (even without config file involved) I need to redo the config changes manually. So, If I change a single cs file and deploy using CI/CD pipeline then my changes in Azure App Service web.config get overwritten and I need to manually do the update again.
How the deployment you guys doing for this scenario?
Why not just add the web.config/debug/release and use Azure KeyVault for secure information (like the connectionstring etc?)
Makes it much easier!
Hi @Ambert, the problem is that the repo is already configured like this so I thought it may be Umbraco recommendation as in the top of the file I see,
After testing I found that Web.config.template is not used at all. If no web.config the new web.config is generated (from where I dunno).
The problem is that Azure DevOps is generating always a new web.config and deploy the new one. How can I tell to not generate the one and use mine?
I have added these lines to in csproj to copy my file at build time if web.config is missing and deploy Web.config.template with Web.config,
is working on a reply...