我正在使用 Microsoft 应用服务来部署我的 Web 应用程序,
它有 staging.domain.com 和 www.domain.com,
但现在它们都链接到同一个 redis,
当我交换它们时,如何让它们链接到不同的 redis?
我认为可以通过应用设置解决。
有什么好的解决方案或建议吗?
最佳答案
如此处所示 documentation ,您可以在 Web Apps 中的不同部署插槽上设置不同的设置,并将它们设置为“粘性”。这将使他们留在部署位置。如果您不将它们标记为粘性,它们将与应用程序交换。
To configure an app setting or connection string to stick to a slot (not swapped), access the Application Settings blade for a specific slot, then select the Slot Setting box for the configuration elements that should stick the slot. Note that marking a configuration element as slot specific has the effect of establishing that element as not swappable across all the deployment slots associated with the app.
关于azure - 当我在 Microsoft Azure 中交换我的应用程序服务时如何更改 redis 目标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48312783/