如何从一个Gi​​t仓库的子目录部署PHP网站的Azure网站 [英] How do I deploy a PHP site to Azure websites from a subdirectory of a Git repository

查看:275
本文介绍了如何从一个Gi​​t仓库的子目录部署PHP网站的Azure网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Git仓库,其中包含了Git仓库的根目录下的ASP.net应用程序和PHP应用程序,都以自己的子目录。我想创建Azure的网站,两个网站和每个应用程序部署到这些网站之一。我可以在网站上的属性的路径,CS项目文件中的设置面板中设置项目变量部署没有问题ASP.net应用程序。不过,我不能顺利拿到PHP站点进行部署。我曾尝试设置wwwroot目录,但Azure是仍在努力打造即使不被该网站上的变量指定它的csproj文件,也不是present在Git仓库的根目录。我怎样才能让PHP网站的正确部署,而无需把它放在自己的资料库?

I have a Git repository which contains an ASP.net application and a PHP application, each in its own subdirectory under the root of the Git repository. I would like to create two websites in Azure websites and deploy each of these applications to one of those websites. I can deploy the ASP.net application with no problem by setting the project variable in the settings panel on the website properties to the path to the CS project file. However I cannot successfully get the PHP site to deploy. I have tried setting the WWWroot directory, but Azure is still trying to build the csproj file even though it is not specified by the variable on that website, nor is it present in the root directory of the Git repository. How can I make the PHP site deploy correctly, without needing to put it in its own repository?

推荐答案

在情况下,它可以帮助,我以前做这在我的一些项目,但由于迁移到一个新的战略。

In case it helps, I used to do this on a number of my projects, but have since migrated to a new strategy.

现在,我创造我的整体项目和库对每个在其中的子工程的一个Git仓库。对于我分享Tweet猴的项目,比如,我有 http://github.com/$c$cfoster/ tweetmonkey 以及 http://github.com/$c$cfoster/tweetmonkey -raspi http://github.com/$c$cfoster/tweetmonkey-爱迪生和网站在 http://github.com/$c$cfoster /tweetmonkey.io

Now, I create a git repository for my overall project and repositories for each of the "sub projects" within it. For my Tweet Monkey project, for instance, I have http://github.com/codefoster/tweetmonkey as well as http://github.com/codefoster/tweetmonkey-raspi, http://github.com/codefoster/tweetmonkey-edison, and the website at http://github.com/codefoster/tweetmonkey.io.

然后我子项目链接到主体工程通过键入在命令提示符下使用子模块...

git的子模块添加http://github.com/$c$cfoster/tweetmonkey-raspi
git的子模块添加http://github.com/$c$cfoster/tweetmonkey-edison
git的子模块添加http://github.com/$c$cfoster/tweetmonkey.io

这样我可以使用CI通过简单地捆绑到tweetmonkey.io库部署网站Azure的,但我也可以使用的 http://github.com/$c$cfoster/tweetmonkey 链接。
希望有所帮助。

Then I link the sub projects into the main project using submodules by typing the following at the command prompt... git submodule add http://github.com/codefoster/tweetmonkey-raspi git submodule add http://github.com/codefoster/tweetmonkey-edison git submodule add http://github.com/codefoster/tweetmonkey.io That way I can deploy the website to Azure using CI by simply tying up to the tweetmonkey.io repository, but I can also clone the entire project or point other people to the entire project using the http://github.com/codefoster/tweetmonkey link. Hope that helps.

这篇关于如何从一个Gi​​t仓库的子目录部署PHP网站的Azure网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆