Thanks for asking question! If the container couldn't start or exited, The application maybe facing a generic error: While importing 'app', an ImportError was raised.
which is causing your app to fail proper startup.
Click https://udatapythonapi.scm.azurewesites.net/api/logs/docker words to access your logs and review them by opening the files with the default_docker.log.
Or
Click https://udatapythonapi.scm.azurewesites.net/api/logstream to access the LogStream
As per findings: Your Application logs contain errors or warnings
• swallow_exception
• _exception
• exception
Please note that if have a Flask app whose main code file is named something other than app.py or application.py*, or the app object is named something other than app then you need a custom startup command.
Please refer to this link https://learn.microsoft.com/en-us/azure/developer/python/tutorial-deploy-app-service-on-linux-04#flask-startup-commands
Also, you may want to know that the App Service deployment engine automatically activates a virtual environment and runs pip install -r requirements.txt
for you when you deploy a Git repository.
Please ensure you’re using relative paths in all pre- and post-build scripts because the build container in which Oryx runs is different from the runtime container in which the app runs.
Virtual environments are not portable, so a virtual environment should not be deployed with your application code. Also, you could let Oryx create a virtual environment and install your packages on the web app by creating an app setting, SCM_DO_BUILD_DURING_DEPLOYMENT,
and setting it to 1.
This will force Oryx to install your packages whenever you deploy to App Service.
Please review the following article that might help you customize and configure your Web App to your requirements https://learn.microsoft.com/en-us/azure/app-service/containers/how-to-configure-python
More details: Things You Should Know: Web Apps and Linux
Let us know if further query.