gpt4 book ai didi

azure - 在子目录下部署应用程序 - Azure

转载 作者:行者123 更新时间:2023-12-04 15:39:47 24 4
gpt4 key购买 nike

我在 github 存储库的子文件夹中有一个微服务应用程序。我正在尝试将其部署到 Azure。

我发现,如果我在根目录中添加 .deployment 文件,Azure 将自动部署在给定路径下找到的应用程序。 Here

我尝试过以下方法,

[config]
project = myFlaskProject/helloFlask

Azure 成功构建了项目,但它仍然给我您没有查看此目录或页面的权限。不知道为什么,有什么想法吗?

附注如果我将所有应用程序文件保存在我的根目录中,它就可以正常工作。

这是我制作的演示测试存储库。 Hello World Flash Repo

这是live demo网站的。

以下是来自 Azure 的构建日志,

Using the following command to generate deployment script: 'azure site deploymentscript -y --no-dot-deployment -r "D:\home\site\repository" -o "D:\home\site\deployments\tools" --python --sitePath "D:\home\site\repository\flask\helloWorld"'.
The site directory path: .\flask\helloWorld
Generating deployment script for python Web Site
Generated deployment script files

Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling python deployment.
KuduSync.NET from: 'D:\home\site\repository' to: 'D:\home\site\wwwroot'
Copying file: 'requirements.txt'
Copying file: 'web.2.7.config'
Copying file: 'web.3.4.config'
Copying file: 'flask\helloWorld\.gitignore'
Copying file: 'flask\helloWorld\index.html'
Copying file: 'flask\helloWorld\LICENSE'
Copying file: 'flask\helloWorld\main.py'
Copying file: 'flask\helloWorld\ptvs_virtualenv_proxy.py'
Copying file: 'flask\helloWorld\README.md'
Copying file: 'flask\helloWorld\requirements.txt'
Copying file: 'flask\helloWorld\web.2.7.config'
Copying file: 'flask\helloWorld\web.3.4.config'
Detected requirements.txt. You can skip Python specific steps with a .skipPythonDeployment file.
Detecting Python runtime from site configuration
Detected python-2.7
Found compatible virtual environment.
Pip install requirements.
Requirement already satisfied (use --upgrade to upgrade): Flask==0.12.1 in d:\home\site\wwwroot\env\lib\site-packages (from -r requirements.txt (line 1))
Cleaning up...
Overwriting web.config with web.2.7.config
1 file(s) copied.
Finished successfully.

最佳答案

Azure 的 python 部署存在错误。但在他们修复之前,有一个解决办法。 Read my issue here

关于azure - 在子目录下部署应用程序 - Azure,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48177399/

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