我正在使用从包运行的azure appservice,通过设置url来使用blob WEBSITE_RUN_FROM_PACKAGE= <my blob url>但它不起作用

问题描述 投票:0回答:1

WEBSITE_RUN_FROM_PACKAGE =

但网站不会出现我已经验证了 Blob URL 是否正确指向 zip 文件,甚至 SAS 密钥也是正确的,但网站不会出现在感知编辑器中我看到一个 txt 文件,上面写着“从包初始化运行失败。”

enter image description here

azure azure-web-app-service azure-appservice
1个回答
0
投票

按照以下步骤使用

WEBSITE_RUN_FROM_PACKAGE=<Blob_SAS_URL>
将 Web 应用程序部署到 Azure。

  1. 将应用程序的 Zip 文件上传到存储容器中并生成 SAS URL。

enter image description here

  1. 使用以下命令将 WEBSITE_RUN_FROM_PACKAGE 应用程序设置配置为存储 Blob 的 SAS URL:
az webapp config appsettings set --name ruklapp --resource-group ruk --settings WEBSITE_RUN_FROM_PACAGE="<Blob_SAS_URL>"
az webapp config appsettings set --name appname --resource-group rgname --settings WEBSITE_RUN_FROM_PACAGE="<Blob_SAS_URL>"

D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\cryptography/hazmat/backends/openssl/backend.py:17: UserWarning: You are using cryptography on a 32-bit Python on a 64-bit Windows Operating System. Cryptography will be significantly faster if you switch to using a 64-bit Python.
App settings have been redacted. Use `az webapp/logicapp/functionapp config appsettings list` to view.
[
  {
    "name": "APPLICATIONINSIGHTS_CONNECTION_STRING",
    "slotSetting": false,
    "value": null
  },
  {
    "name": "ApplicationInsightsAgent_EXTENSION_VERSION",
    "slotSetting": false,
    "value": null
  },
  {
    "name": "XDT_MicrosoftApplicationInsights_Mode",
    "slotSetting": false,
    "value": null
  },
  {
    "name": "WEBSITE_RUN_FROM_PACAGE",
    "slotSetting": false,
    "value": null
  }
]

我可以在Azure App Service的KUDU站点中看到部署的文件:

enter image description here

回复:

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.