简体   繁体   English

Azure ARM部署插槽-添加应用程序设置

[英]Azure ARM Deployment slot - adding application settings

When I read the doc for both slot and site, 当我同时阅读广告位和网站的文档时,

  1. Website: https://docs.microsoft.com/en-us/azure/templates/microsoft.web/2018-02-01/sites 网站: https : //docs.microsoft.com/zh-cn/azure/templates/microsoft.web/2018-02-01/sites
  2. Deployment slot: https://docs.microsoft.com/en-us/azure/templates/microsoft.web/2018-11-01/sites/slots 部署插槽: https//docs.microsoft.com/zh-cn/azure/templates/microsoft.web/2018-11-01/sites/slots

I can see that I can apply application settings by adding to properties.siteconfig.appsettings to either the website or a slot. 我看到可以通过将properties.siteconfig.appsettings添加到网站或广告位来应用应用程序设置。 This I how I do it today for the website, but I am wondering if, even though the deployment slot has the same structure, if I can add settings to my slot by doing the same? 这就是我今天在网站上的操作方式,但是我想知道,即使部署插槽具有相同的结构,我是否也可以通过相同的方式将设置添加到插槽中? I don't care about sticky settings. 我不在乎粘性设置。 The reason why I am asking is that when I export from the portal I can't see how they do it and everywhere I look on the Internet people is using the Microsoft.Web/sites/config type or Microsoft.Web/sites/slots/config type. 我问的原因是,当我从门户网站导出时,我看不到它们是如何做的,并且在Internet上到处可见的人们都在使用Microsoft.Web / sites / config类型或Microsoft.Web / sites /插槽/ config类型。 Can't i just use properties.siteconfig.appsettings as in the doc for the deploy slot, or am I missing something fundamental? 我不能像在文档中那样只使用properties.siteconfig.appsettings作为部署槽,还是我缺少基本的东西?

I am not in a position where I can go to a computer and test it, but my mind is going nuts to find out. 我无法使用计算机进行测试,但是我的脑袋发疯了。

You could indeed configure the appsettings through the siteconfig tag. 您确实可以通过siteconfig标记配置siteconfig As for your puzzle, it's because you don't understand why there are two ways to set the appsettings. 关于您的难题,这是因为您不了解为什么有两种方法来设置应用程序设置。

Actually the siteconfig is used to Prevent copying settings from the Prod site , you could check the github pull. 实际上, siteconfig用于防止从Prod站点复制设置 ,您可以检查github拉。

Hope this could help you. 希望这可以对您有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ARM模板部署中缺少Azure Web App临时插槽应用程序设置 - Azure Web App staging slot App Settings missing on ARM template deployment Azure交换部署插槽粘性设置不起作用 - Azure Swap Deployment Slot Sticky Settings Not Working Azure部署插槽-向该插槽添加权限 - Azure Deployment Slots - adding permissions to the slot Azure 应用服务部署槽 - 应用网关 - Azure App Service Deployment Slot - Application Gateway 将 cloninginfo 属性添加到 arm 模板部署槽资源会中断在部署槽上设置用户定义的托管标识 - Adding cloninginfo property to arm template deployment slot resource breaks setting user defined managed identity on deployment slot 在Azure中如何将监视设置链接到部署插槽? - In Azure how do I link the monitoring settings to a deployment slot? 部署槽设置如何在 Azure 应用服务上工作? - How do deployment slot settings work on an Azure App Service? 用于 .NET 应用程序的 Azure ARM 模板部署 - Azure ARM template deployment for a .NET application 为Azure网站部署插槽添加自定义域名时出错 - Error adding custom domain name for azure website deployment slot 从 azure 查询 azure 应用程序网关设置或整个 ARM 模板 - Query azure application gateway settings or whole ARM template from azure
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM