Search code examples
phpgitazureazure-web-app-serviceazure-git-deployment

How do I deploy a PHP site to Azure websites from a subdirectory of a Git repository


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?

Tried mapping ~ to \code

Failed deployment


Solution

  • Figured it out: I just set the "Project" attribute in app settings to the directory name of the PHP application, relative to the root of the repo.