projectkudu / kudu

Kudu is the engine behind git/hg deployments, WebJobs, and various other features in Azure Web Sites. It can also run outside of Azure.
Apache License 2.0
3.12k stars 652 forks source link

APP Service set WEBSITE_RUN_FROM_PACKAGE=1 make node project serve as static website #3419

Closed Siglud closed 1 year ago

Siglud commented 1 year ago

For deployment issues, please provide us with the following information:

Repro steps.

Setup an app service running on windows Set WEBSITE_RUN_FROM_PACKAGE=1 on the Azure portal Run npm install --production in the local JS/Node project, and package all the files into a zip file without any extra folder (The package.json is in the root path) Deploy packaged zip file using zip push deploy in Kudo interface curl http://xxxxxxx.azurewebsites.net/app.js will show the js content no node process in process explorer

Project structures.

Sample project inited by npx using npx express-generator myExpressApp --view ejs

The log/error given by the failure.

Deploy log shows successes. log.log

2022-11-23T16:57:49.9849222Z,Updating submodules.,7285d065-50f3-4cb0-83c9-acd685796adb,0
2022-11-23T16:57:50.0630959Z,Preparing deployment for commit id '2763fa06f4'.,e7ff1119-7f53-4038-9e59-cc653d23ebb1,0
2022-11-23T16:57:50.2661756Z,Skipping build. Project type: Run-From-Zip,4d3ea99f-010d-4f27-8b52-9f9cddb1be35,0
2022-11-23T16:57:50.3130956Z,Skipping post build. Project type: Run-From-Zip,4b7e9c05-ff94-4c23-ac9a-667c57123012,0
2022-11-23T16:57:50.3912094Z,Triggering recycle (preview mode disabled).,31c6c7a8-a682-44ff-a63b-2c11fefe8768,0
2022-11-23T16:57:50.4538618Z,Deployment successful.,1677bb3c-220b-40d4-ab88-e665205d9610,0

status.xml

<?xml version="1.0" encoding="utf-8"?>
<deployment>
<id>------</id>
<author>N/A</author>
<deployer>ZipDeploy</deployer>
<authorEmail>N/A</authorEmail>
<message>Created via a push deployment</message>
<progress></progress>
<status>Success</status>
<statusText></statusText>
<lastSuccessEndTime>2022-11-23T16:57:50.4693694Z</lastSuccessEndTime>
<receivedTime>2022-11-23T16:57:49.906795Z</receivedTime>
<startTime>2022-11-23T16:57:50.0942985Z</startTime>
<endTime>2022-11-23T16:57:50.4693694Z</endTime>
<complete>True</complete>
<is_temp>False</is_temp>
<is_readonly>True</is_readonly>
<project_type>Run-From-Zip</project_type>
<vsproject_id></vsproject_id>
</deployment>

Debug your Azure website remotely.

Just a sample created followed steps by https://learn.microsoft.com/en-us/azure/app-service/quickstart-nodejs?tabs=windows&pivots=development-environment-azure-portal

Mention any other details that might be useful.


Thanks! We'll be in touch soon.

Siglud commented 1 year ago

NodeJs project requires web.config file