How to set up Python environment on Azure App Service in Linux OS

2020-06-29T07:29:55.74+00:00

Hi,

I am quite new in azure web app services. I am having issue with deploying python web app on azure (linux os).

let's say I have written an application in python flask. And i have imported some packages in python.For example, I have imported Flask-mail and I have run pip freeze to create requirement.txt file in my IDE where all the packages that I have imported are mentioned.

Now, I created an empty web app on azure on azure (by default, the OS will be chosen as Linux If I mention running stack is Python). After this, I deployed my python application to that azure web app using azure cli command from my local machine to azure server.

How azure will determine which packages I have used and after that will azure download those packages while deployment?? Or do i need to run the requirement file on azure server explicitly?
Can anyone please let me help in this step by step deployment on linux azure web app.

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,913 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 28,636 Reputation points Microsoft Employee
    2020-06-30T03:16:31.357+00:00

    Hi @MITRA, Debartha (GE CoreTech & Cyber) ,

    The requirements.txt file is automatically ran when the Azure App service discovers this file among the list of deployed files. Have a look at https://learn.microsoft.com/en-us/azure/azure-functions/functions-how-to-azure-devops?tabs=python for setting up a CI/CD pipeline on https://dev.azure.com. Let me know if that helps. If you found any of the answers to the questions helpful, please be sure to mark them answer in order to help the great community.

    1 person found this answer helpful.
    0 comments No comments

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.