azure - 将python web部署到azure应用程序服务时如何选择区域?

标签 azure visual-studio-code azure-web-app-service

当我将 python Web(flask)应用程序部署到 Azure 应用程序服务时,出现以下错误

message: vs code create web app failed. This region has quota of 0 instances for your subscription.

我的问题是如何在 VS code 中选择另一个区域?

非常感谢任何建议?

最佳答案

Azure 订阅附带分配给每个资源的有限配额。如果部署失败并出现 0 配额实例错误,您可以通过创建请求增加支持请求来增加特定区域的配额 here

一旦部署 Web 应用程序,您就无法为它选择不同的区域,因为 Web 应用程序实例已部署在特定区域且无法更改。这里唯一的选择是在另一个区域重新部署一个新的 Python Web 应用程序,而不是给您带来配额错误的区域。请参阅以下内容:-

当我尝试通过 VS Code 部署 Azure Web 应用程序时,默认情况下它选择了美国中部地区,并且我收到了与您相同的错误代码:-

enter image description here

enter image description here

为了在创建 Web 应用程序时选择区域,请使用 Vs Code 中的创建新 Web 应用程序(高级) 选项,如下所示:-

enter image description here

输入网络应用程序的名称:-

enter image description here

创建一个新的资源组或选择一个现有的资源组,我已经创建了一个新的资源组,如下所示:-

enter image description here

如果您使用现有资源组,请确保您在美国中部以外的区域创建该资源组,该区域存在配额错误:-

enter image description here

现在,由于我已选择创建新资源组,请选择区域。确保您选择美国中部以外的其他区域。我选择了澳大利亚东部,如下所示:-

enter image description here

输入新的应用服务计划名称:-

enter image description here

enter image description here

创建新的应用程序洞察资源,如下所示:-

enter image description here

在澳大利亚东部地区成功创建网络应用程序,请参阅以下内容:-

enter image description here

现在将您的源代码部署到此 Web 应用程序:-

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

引用:-

Quickstart: Deploy a Python (Django or Flask) web app to Azure - Azure App Service | Microsoft Learn

关于azure - 将python web部署到azure应用程序服务时如何选择区域?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76949539/

相关文章:

azure - 应用程序未经租户管理员安装或未经租户中任何用户同意。授权错误

Azure流量管理器ARM模板不会采用resourceTargetId

c# - 如何在blob存储中上传具有原始文件夹结构的文件?

azure - 如何从逻辑应用程序中删除 blob 存储中的目录

azure - 通过 VS Code 编辑 Azure 逻辑应用标准的代码

python - Azure blob 触发器错误 :The condition specified using HTTP conditional header(s) is not met

npm - 在 Visual Studio Code 中运行 npm 命令

visual-studio-code - 我可以查看并单独禁用扩展程序(例如 Sublime Text Keymap 扩展程序)的键盘快捷键吗?

javascript - ESlint 初始化设置未显示 VSCode Windows 操作系统

azure - 如何使用私有(private)存储库作为依赖项通过 git Push 部署 Azure Go Web 应用程序?