Django app deployed on Azure app services not appearing

Gilang 6 Reputation points
2020-01-26T06:32:21.993+00:00

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 App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,181 questions
{count} vote

4 answers

Sort by: Most helpful
  1. HowardPaggerton 81 Reputation points
    2021-10-12T10:36:37.14+00:00

    Basically if the log stream shows "Could not find setup.py or requirements.txt; Not running pip install." it means that the Oryx build process failed to find your requirements.txt file you can connect to the web app's container via SSH and verify that requirements.txt is named correctly and exists directly under site/wwwroot. If it doesn't exist, make site the file exists in your repository and is included in your deployment. If it exists in a separate folder, move it to the root.

    Here is the Azure reference, plus I recommend to check up with some Django tutorials.

    3 people found this answer helpful.
    0 comments No comments

  2. ajkuma 23,731 Reputation points Microsoft Employee
    2020-01-27T16:54:40.667+00:00

    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.

    0 comments No comments

  3. Anna_Manzoni 1 Reputation point
    2021-10-25T09:33:52.767+00:00

    You can try to follow this manual:

    • The log stream shows "Could not find setup.py or requirements .txt; Not running pip install.": The Oryx build process failed to find your requirements .txt file.
    • Connect to the web app's container via SSH and verify that requirements .txt is named correctly and exists directly under site/wwwroot. If it doesn't exist, make site the file exists in your repository and is included in your deployment. If it exists in a separate folder, move it to the root.

    In general, that article describes how Azure App Service runs Python apps, in particular Django timefield, and how you can migrate existing apps to Azure, and customize the behavior of App Service when needed. Python apps must be deployed with all the required pip modules.

    0 comments No comments

  4. HD-data 0 Reputation points
    2023-03-01T22:34:30.95+00:00

    I had the same proble when I tried to deploy a web application towards Visual Studio Code, The OUTPUT log showed me could not find requirements .txt.
    By default django create 2 folders with the same name I only put the information out from the Upper forlder as the code above and the problem was solved.**

    rp-portfolio/
    │
    ├── personal_portfolio/
    │ ├── personal_portfolio/
    │ │ ├── __init__.py
    │ │ ├── settings.py
    │ │ ├── urls.py
    │ │ └── wsgi.py
    │ │
    │ └── manage.py
      └──requirements.txt
    │   
    │
    └── venv/
    
    
    
    
    rp-portfolio/
    │
    ├── personal_portfolio/
    │   ├── __init__.py
    │   ├── settings.py
    │   ├── urls.py
    │   └── wsgi.py
    │
    ├── venv/
    │
    ├──requirements.txt
    └── manage.py
    
    0 comments No comments