简体   繁体   中英

Deploying an Angular Universal App in Azure web app service - Linux based

I'm trying to deploy an Angular Universal App in Azure web app service (Linux webapp) using azure devops pipeline and build/release pipeline are successfully completed. Please see below screenshot.

构建管道

发布管道

Also, I tried to add this pm2 serve /home/site/wwwroot -no-daemon-spa in startup command for Azure Application Setting but no luck. I am still not able to accesss my angular webapp page. When I try to access Azure web app it's loading default azure webapp page.

命令截图

when I check Azure Web App Application logs , I found this -

Platform logs contain errors or warnings

Container webapp_2_547df8bc didn't respond to HTTP pings on port: 8080, failing site start Container webapp_2_547df8bc for site webapp has exited, failing site start

Kindly suggest if some one has any idea?

After spending couple of hours on this, I was able to deploy this app using Azure pipeline after making below change in server.ts file -

const distFolder = join(process.cwd(), 'dist/app_name/browser');

And changing startup command for Azure Application Setting from pm2 serve /home/site/wwwroot -no-daemon-spa to node /home/site/wwwroot/dist/app_name/server/main.js

它对我有用,无需在 Angular 中添加任何更改,只需在App services(Web app Linux) -> configuration -> Startup command

pm2 serve /home/site/wwwroot --spa --no-daemon

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM