Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
Hi @Ganapathy Ram S
To troubleshoot the issue with your Azure Web App for Linux running a Flask application,
Instead of using flask run, it is recommended to use Gunicorn as the WSGI server for production applications. You can specify a startup command that includes Gunicorn, for example:
gunicorn --bind=0.0.0.0 --timeout 600 --workers=4 <module>.wsgi
Replace <module> with the appropriate module name.
Ensure that you have a requirements.txt file in the root of your application. This file should list all the dependencies your application needs. If this file is missing or incorrectly named, the deployment may fail to install the required packages.
Verify that your app is structured correctly for Azure App Service. Ensure that your Flask application is set up according to the expected structure.
Check the application logs for any error messages that can provide more insight into why the application is not starting. You can access the logs through the Azure portal or by using the Azure CLI.
Consider creating an app setting named SCM_DO_BUILD_DURING_DEPLOYMENT with a value of 1. This setting forces the Oryx build process to install your packages whenever you deploy to App Service.
Following these steps should help you identify and resolve the issue with your application not starting.
References:
- Configure a Linux Python app for Azure App Service
- Customize startup command
Let me know if you have any further assistances needed.