Search code examples
azure-web-app-serviceiisnodeazure-pipelines-build-task

iisnode.yml disappears during deployment


I am using VSTS's Deploy Azure App Service task to deploy a node.js app to an Azure App Service Web App, supplying a custom iisnode.yml, web.config, and deploy.cmd.

My VSTS build artifacts looks fine through the explorer:

site
  config
  dist
  public
  .deployment
  deploy.cmd
  iisnode.yml
  package.json
  server.js
  web.config
  yarn.lock

The task has checkedmarked:

Publish using Web Deploy
Remove additional files at destination 

The task's Deploy Azure App Service.log shows (it says Updating instead of Adding for iisnode.yml because I manually added one before this deploy).

...
2017-05-07T05:51:51.4939189Z Info: Updating file (MyRepo\iisnode.yml).
2017-05-07T05:51:51.4939189Z Info: Updating file (MyRepo\package.json).
...

And the deploy.cmd is pretty much just using yarn instead of npm from the scripts you can generate with the azure cli.

However, in the Azure debug console, it does not list iisnode.yml:

PS D:\home\site\wwwroot> ls


    Directory: D:\home\site\wwwroot


Mode                LastWriteTime     Length Name                              
----                -------------     ------ ----                              
d----          5/5/2017   5:27 PM            config                            
d----          5/5/2017   5:27 PM            dist                              
d----          5/7/2017   7:07 AM            node_modules                      
d----          5/5/2017   5:27 PM            public                            
-a---          5/7/2017   6:43 AM         32 .deployment                       
-a---          5/7/2017   6:43 AM       3657 deploy.cmd                        
-a---          5/7/2017   6:43 AM       4509 package.json                      
-a---          5/7/2017   6:43 AM        148 server.js                         
-a---          5/7/2017   6:43 AM       2556 web.config                        
-a---          5/7/2017   6:43 AM     269807 yarn.lock                     

This causes the node process with run without the desired settings. What is removing iisnode.yml?


Solution

  • The work around I did was either put all the settings in web.config or just the line:

    <iisnode configOverrides="iisnodeoverride.yml"/>
    

    It seems changing from the default name made it stick.