How to run custom deployment steps when deploying to App Service for Linux
Well I hope this is the write place to post this question.
I came from: https://docs.microsoft.com/en-us/azure/app-service/containers/quickstart-nodejs
I am trying to deploy a nodejs app to azure which has custom build steps.
I would like the deployment to run:
After it's deployed
It seems it only runs
npm install --production and then tries to run the file listed in the
main field of package.json. Although the source is in typescript so I would need to compile it first.
That you can add a
.deployment file to call
deploy.cmd file which will execute commands.
kuduscript, generated the files, and edited them with the correct command but they don't seem to be run when deploying to an App Service for Linux.
I'm also deploying using the Azure App Service VSCode extension so I don't know if that is causing the oddity.
I have tried deploying to a regular / old App Service (Not Linux Container) and it seems to run the steps and deploy as expected.
When deploying on Linus it says:
2019-02-09T20:22:22.401Z - Generating deployment script.
2019-02-09T20:22:22.709Z - Using the following command to generate deployment script: 'azure site deploymentscript -y --no-dot-deployment -r "/tmp/zipdeploy/extracted" -o "/home/site/deployments/tools" --basic --sitePath "/tmp/zipdeploy/extracted"'.
2019-02-09T20:22:24.956Z - Generating deployment script for Web Site
2019-02-09T20:22:24.983Z - Generated deployment script files
2019-02-09T20:22:26.768Z - Running deployment command...
2019-02-09T20:22:26.782Z - Command: "/home/site/deployments/tools/deploy.sh"
2019-02-09T20:22:28.529Z - Handling Basic Web Site deployment.
When deploying on the Windows it says:
2019-02-09T21:09:35.035Z - Running custom deployment command...
2019-02-09T21:09:35.160Z - Running deployment command...
2019-02-09T21:09:35.160Z - Command: deploy.cmd
2019-02-09T21:09:37.942Z - Handling node.js deployment.