Azure 应用服务上的 Web2py 项目部署

Web2py project deployment on Azure app service

我目前正在使用 PythonAnywhere 部署我的 web2py 项目,它对我来说工作正常。

现在我想在 Azure 应用服务上部署我的 web2py 应用程序。我遵循了下面护目镜组

中提到的所有步骤

Creating web apps with Web2py in Azure Web Apps

我仍然可以看到 azure python 网络应用程序的默认页面。我还尝试使用给定 git 存储库中提到的相同代码库来做到这一点。

我无法弄清楚我应该参考哪个文档或将 web2py 项目部署到 Azure Web 应用服务的正确步骤是什么。


以下是我将 web2py 项目部署到 Azure 应用服务所遵循的步骤

  1. 使用 P1V2 应用服务计划创建了 Azure 应用服务。 Linux 机器 python 3.6 默认语言

  2. 在部署中心选择本地 git 存储库并将代码推送到 azure git 存储库。它显示部署成功消息

  1. 浏览 azure 网站,但这次没有显示预期的登录页面。它显示了 azure 网站的默认应用程序页面

我尝试了 3-4 次步骤,但每次都得到相同的结果。我在这里错过了什么吗?

我查看了你提到的Google组的论坛帖子Creating web apps with Web2py in Azure Web Apps,我看到它的附件中有一个名为web.config的文件,如下图。

不过2015-11-13的讨论太老了。当时,Azure 仅支持 Windows 用于 Azure App Services,但您试图在 Linux 的 Azure WebApp 上基于 Docker 重现它,因为 P1V2 Sku 用于Linux和Standard S1为Windows,如下图

P1V2 Windows

的 Azure 应用服务计划 Sku

Standard S1 Windows

的 Azure 应用服务计划 Sku

因此,如果您想为 Windows 在 Azure WebApp 上重现 Google Groups 线程的相同应用程序,请尝试参考我对其他 SO 线程的回答 .没有任何 Azure 官方文档介绍如何在 Azure Windows WebApp 上部署 Python 应用程序。

否则,请参考两个 Azure 官方文档 Quickstart: Create a Python app in Azure App Service on Linux and Configure a Linux Python app for Azure App Service to try to change and deploy it on Azure Webapp for Linux. Even that you need to follow the document Configure a custom Linux container for Azure App Service 创建自定义 docker 映像进行部署。