Regarding not being able to deploy the project in Azure which is connected to Github

Sakar Dahal 0 Reputation points
2025-01-23T07:53:31.06+00:00

Hello, I have a Django project which I uploaded to GitHub first and then tried to connect to Azure.

The build process has been successful as per the Action tab in GitHub.But the process gets to the Deploy part, it takes around 30 minutes and then provide me with the warning as:

"2025-01-22 15:48:10"|WARNING|Missing Django module in /tmp/8dd3afa6c264451/requirements.txt | Exit code: 0 | Add Django to your requirements.txt file.

More information: https://aka.ms/troubleshoot-python

Not a vso image, so not writing build commands

After this the execution stops and the deployment fails

When I pushed the code along with requirements.txt, the django with the version 4.2.17 has been included.

With this version of Django and the python version of 3.11.8 , the project worked perfectly fine in the local machine. But it doesn't work during the deployment.

I am looking for the help. Thanks.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,195 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,246 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Amira Bedhiafi 28,376 Reputation points
    2025-01-23T13:07:15.1166667+00:00

    Try to explicitly include the version of Django in your requirements.txt.

    Verify that the Python version (3.11.8) is selected in Azure App Service under Configuration > General Settings. Ensure the runtime matches your local machine configuration.

    Add a startup command in Configuration > General Settings (if applicable):

    gunicorn <project_name>.wsgi:application --bind 0.0.0.0:8000
    
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.