Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
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
- Name:
- 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.txtor startup detection issues.
- Confirm the deployment package contains the app in the expected structure.
- The app code and
requirements.txtneed 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.
- The app code and
- If the files do exist in
site/wwwrootafter 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 upsetsSCM_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.