简体   繁体   English

Azure Devops将Django应用程序部署到Linux Azure App Service

[英]Azure Devops deploy django application to Linux Azure App Service

Before deploying to Linux App Service check status of the Virtual Network at present this is in PREVIEW and we were unable to, easily, connect back into our internal network. 目前,在部署到Linux App Service之前,检查虚拟网络的状态是在PREVIEW中,我们无法轻松地重新连接到我们的内部网络。 There is a work around for Docker deployment but you loose most of the benefits of the standard App service :-( 可以解决Docker部署问题,但是您失去了标准App服务的大部分优势:-(

Like many AzureDevops tasks this should be easy, but is turning into masochistic nightmare of re-reading the same copied and pasted tutorial examples. 像许多AzureDevops任务一样,这应该很容易,但是变成重新阅读相同的复制和粘贴的教程示例的自虐式噩梦。

Following the VSCode tutorial https://code.visualstudio.com/docs/python/tutorial-deploy-app-service-on-linux everything works beautifully and I can see in the output the virtual antenv being created and configured. 遵循VSCode教程https://code.visualstudio.com/docs/python/tutorial-deploy-app-service-on-linux,一切正常,我可以在输出中看到正在创建和配置的虚拟天线。

However, it's taken a long time to get away from the right-click -> publish habit and to start using AzureDevops as our pipeline, I'm very uneasy nowadays about publishing from my local repo and dev machine. 但是,要想摆脱右键单击->发布习惯并开始使用AzureDevops作为我们的管道花费了很长时间,所以如今对于从本地回购和开发机进行发布感到非常不安。

Trying to get the same working deployment in AzureDevops has thus far not proven particularly easy. 到目前为止,在AzureDevops中尝试获得相同的工作部署还没有被证明特别容易。 The closest help I can find is in this article https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/python-webapp?view=azure-devops#create-and-run-an-initial-pipeline where if followed through results in the contents of the .zip folder being deployed to \\wwwroot folder correctly but the install process not completing by creating a VEnv and installing from the requirements.txt. 我可以在本文中找到最接近的帮助https://docs.microsoft.com/zh-cn/azure/devops/pipelines/ecosystems/python-webapp?view=azure-devops#create-and-run-an-初始管道 ,如果遵循该管道 ,则会将.zip文件夹的内容正确部署到\\ wwwroot文件夹,但是安装过程不会通过创建VEnv并从requirements.txt安装而完成。

Is it simply the case that this only works from a GitHub repo and not from an Azure Repo? 这仅是仅适用于GitHub存储库而不适用于Azure存储库的情况吗?

Here we go, it's easy when know what to google for 到这里,知道Google的用途很容易

http://www.redbaronofazure.com/?p=7667 http://www.redbaronofazure.com/?p=7667

To instruct the new Oryx build that I need it's help I'm going to set an app setting of name SCM_DO_BUILD_DURING_DEPLOYMENT to true. 为了指示新的Oryx构建所需要的帮助,我将将名称为SCM_DO_BUILD_DURING_DEPLOYMENT的应用设置设置为true。 When the runtime of the App Services app is set to Python, Oryx will then run the “pip install -r requirements.txt” command for me. 当App Services应用程序的运行时设置为Python时,Oryx将为我运行“ pip install -r requirements.txt”命令。

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

相关问题 Django:在 Azure 应用程序服务上找不到模块 - Azure DevOps CD - Django: Module not Found on Azure App Service - Azure DevOps CD 使用 django 写入 Azure 应用服务 linux 中的 /tmp - Writing in /tmp in Azure app service linux with django 在 Azure 应用服务上的 Django 应用程序中出现错误 - Getting Error in Django Application on Azure App Service 为什么Azure App Service django部署会不断失败? - Why is the azure app service django deploy keep failing? 如何将存储库中的特定 django 文件夹部署到 azure 应用程序服务? - How to deploy a specific django folder in a repository to an azure app service? 如何在Azure上部署Django应用程序? - How to deploy Django app on Azure? DevOps 和 Azure 应用服务中的环境变量 - Environment Variables in DevOps and Azure App Service Django Web应用已成功部署在Azure App Service Linux上,但只能看到Azure默认页面 - Django Web app is successfully deployed on Azure App Service Linux but can only see Azure Default Page 使用 Devops CI/CD 将 Django Web 应用程序部署到 Azure 应用程序服务上 - Deploying Django Web App using Devops CI/CD onto Azure App Service 在 Azure App Service 中为 Django 应用程序保存每日日志 - saving day wise logs in Azure App Service for Django Application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM