question

Gilang-7284 avatar image
0 Votes"
Gilang-7284 asked ·

Django app deployed on Azure app services not appearing

I tried to deploy a Django application using Azure App Services. To be more specific, I followed this tutorial, with some additional features I added to the application.

However, when I tried to open the application by your-azure-project.azurewebsites.net, the "Hey, Python developers!" page keeps appearing instructing me to deploy my application. Of course, I replaced your-azure-project with my real project name; and I also tried to redeploy my application. In the end, the result didn't change at all.

2451-anotasi-2020-01-26-133057.png

I am still new with the Azure platform, so I was wondering if anybody could point out what I was missing? Thanks in advance.


azure-webapps-developmentazure-webapps-content-deployment
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ajkuma-MSFT avatar image
0 Votes"
ajkuma-MSFT answered ·

Welcome to Microsoft Q&A! Thanks for posting the question.

If the App Service doesn't find a custom command, a Django app runs a default read-only app, located in the opt/defaultsite folder. You can control the container's startup behavior by providing a custom Gunicorn startup command. To do this, kindly take a look into this document for detailed steps.
-App Service looks for a file named wsgi.py within your app code, and then runs Gunicorn.

App Service ignores any errors that occur when processing a custom command file, then continues its startup process by looking for Django and Flask apps. Also, kindly review the startup file is deployed to App Service and that it doesn't contain any errors.

Note that the Python extensions for App Service on Windows is deprecated in favor of a direct deployment to App Service on Linux. So, leverage App Service for Linux rather than a Windows-based instance. Also, ensure that the Python module is correctly set requirement.txt and include below line of code as first line in requirements.txt file “ --find-links wheelhouse”.

Kindly let us know how it goes for further investigation.

· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.