'NestJs deployed to Azure Linux Web App wont start

I have spent many days but still can not get this to work.

I have setup a deployment pipeline for NextJS I have the dist folder and I'm also copying the node modules folder etc. The build pipeline works, makes a package which is then deployed to a Azure Linux Web App.

Problem is can not hit the application

I look into the logs and I can see the app has started but for some reason the container fails and the site never works.

enter image description here

enter image description here

I'm pulling my hair out here I have tried everything, read every guide I can find but nothing seems to work. Help me stack-bi-wan-overflow your my only hope.



Solution 1:[1]

As you have confirmed in your comment , Converting this to answer to help other community members.

To achieve the above requirement make sure that you have used express instead of using fastify . As fastify must have different network configuration which can not connect with container.

For more information please refer the below links:-

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 AjayKumarGhose-MT