Edit:
Before reading everything below, I can be more succinct in asking why is Azure/KuduSync ignoring my .deployment
file and how do I instruct the Kudu App Service to process the file?
I have written a Node.js/React project using Visual Studio 2017. When I link it to a GitHub repository, it copies the parent directory which contains the .sln
file and the project folder containing the node.js
application.
The problem I'm running into is when I deploy the repository to my Azure deployment slot, Kudu copies the root of the GitHub repository containing the .sln
file and the subfolder to the wwwroot folder.
When I browse to the Azure website, I have to go to the
[name].azurewebsite.net/[subfoldername]
to access Index.html
.
I have tried creating a .deployment
file with the following configuration:
[config]
project=[subfolder]
I have placed this in the root of my GitHub repository. When I try to deploy, KuduSync ignores the .deployment
file.
I have also tried creating a "PROJECT" application setting pointing to the subdirectory and flagging it as a "Deployment slot setting" within my Azure web app slot.
None of these options have instructed Kudu to deploy directly from the subfolder rather than the root of the repository.
[Edit] This is the GitHub and Azure directory structure Snapshots of Directories
[Here's the log from Azure. As you can see it ignores the.deployment file]
Command: kudusync -v 50 -f /home/site/repository <br/>
-t /home/site/wwwroot <br/>
-n /home/site/deployments/[site]/manifest <br/>
-p /home/site/firstDeploymentManifest <br/>
**-i ".git;.hg;.deployment;.deploy.sh"** <br/>
Kudu sync from: '/home/site/repository' to: '/home/site/wwwroot' <br/>
**Ignoring: .deployment** <br/>
Copying file: '.gitattributes' <br/>
Copying file: '.gitignore' <br/>
I figured out that using the Continuous Deployment option in Azure prevents me from using a custom deployment file. Instead, I decided to create another repository in GitHub from my subfolder. This will allow me to us Azure CD/CI to write my project files directly to wwwroot. Thanks for all of your help.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.