'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.

Build Pipeline

Release pipeline

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.

Command sreenshot

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?



Solution 1:[1]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ashwani Kumar