gpt4 book ai didi

django - Azure Devops 将 django 应用程序部署到 Linux Azure 应用服务

转载 作者:行者123 更新时间:2023-12-05 07:19:28 26 4
gpt4 key购买 nike

在部署到 Linux 应用服务之前,检查虚拟网络的状态,目前这处于预览状态,我们无法轻松地连接回我们的内部网络。 Docker 部署有一个解决方法,但您失去了标准应用程序服务的大部分好处:-(

像许多 AzureDevops 任务一样,这应该很容易,但正在变成重新阅读相同的复制和粘贴的教程示例的受虐噩梦。

遵循 VSCode 教程 https://code.visualstudio.com/docs/python/tutorial-deploy-app-service-on-linux一切都运行良好,我可以在输出中看到正在创建和配置的虚拟 antenv。

但是,我花了很长时间才摆脱右键 -> 发布的习惯并开始使用 AzureDevops 作为我们的管道,现在我对从本地存储库和开发机器进行发布感到非常不安。

迄今为止,尝试在 AzureDevops 中获得相同的工作部署并不是特别容易。我能找到的最接近的帮助是在这篇文章中 https://learn.microsoft.com/en-us/azure/devops/pipelines/ecosystems/python-webapp?view=azure-devops#create-and-run-an-initial-pipeline其中 if 后续操作会导致 .zip 文件夹的内容正确部署到\wwwroot 文件夹,但通过创建 VEnv 并从requirements.txt 安装,安装过程无法完成。

这是否只是仅适用于 GitHub 存储库而不适用于 Azure 存储库的情况?

最佳答案

开始吧,知道要通过 Google 搜索什么内容就很容易了

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. 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.

关于django - Azure Devops 将 django 应用程序部署到 Linux Azure 应用服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57769273/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com