The behavior matches a deployment package being copied but not built into a runnable Python app on App Service. For Python on Linux App Service, if the app shows the default page after a successful deployment, App Service either didn’t find the app files under site/wwwroot or didn’t build the app during deployment.
Use this troubleshooting path:
- In Azure Portal, open the web app and restart it.
- Wait about 20 seconds and test again.
- Verify what exists under
site/wwwroot.
- If only the artifact zip is present and the app files are not expanded there, App Service is not seeing a deployed runnable app layout.
- Enable build during deployment.
- In the web app, go to Configuration.
- On Application Settings, add:
- Name:
SCM_DO_BUILD_DURING_DEPLOYMENT
- Value:
true
- Save the setting.
- Redeploy or run the pipeline again.
- Check deployment logs and App Service diagnostics.
- In the Azure portal, open Diagnose and solve problems.
- Go to Availability and Performance.
- Review Application Logs, Container Crash, and Container Issues.
- Also review the deployment logs for errors such as missing
requirements.txt or startup detection issues.
- Confirm the deployment package contains the app in the expected structure.
- The app code and
requirements.txt need to be in the project root that gets deployed.
- If App Service cannot find the app code, it can fall back to the default page.
- If the files do exist in
site/wwwroot after redeployment but the app still does not start, check startup detection.
- For Python apps, ensure the app is structured as App Service expects, or use a custom startup command.
Important detail for the pipeline setup:
- The Python web app pipeline guidance notes that missing dependency installation during deployment commonly happens when the web app was created in the portal instead of with
az webapp up.
-
az webapp up sets SCM_DO_BUILD_DURING_DEPLOYMENT=true; portal-created apps do not set this automatically.
Since the release succeeds but the site shows the default page, the most likely fix is to set SCM_DO_BUILD_DURING_DEPLOYMENT to true and redeploy, then verify that the deployed files appear under site/wwwroot instead of only the zip artifact.