Az_AppServices

Deploying a python-flask application in Azure App Service using CLI from Windows

Pre-requisites:

Configurations:

  1. Create a new directory from powershell C:\tmp\azureappdemo and cd into it
    mkdir C:\tmp\azureappdemo
    cd C:\tmp\azureappdemo
    
  2. Now, clone the code locally into your system
    git clone https://github.com/Prozects/msdocs-python-flask-webapp-quickstart.git
    
    cd msdocs-python-flask-webapp-quickstart
    
  3. Check if the python already exists in your system, If not found in your local m/c, kindly install it from an Elevated terminal using chocolatey
    python --version
    
  4. Next, after python installation & confirmation, create a virtual environment which is specific to the python application
    py -m venv .venv
    
  5. Activate the virtual environment
    .\.venv\scripts\Activate.ps1
    
  6. Install Flask
    pip install -r requirements.txt
    

Login into Azure CLI:

az login

’–sku’ F1=Free Plan, B1=Basic Plan

’–logs’ where we can see the logs of this application

Preview

Preview

References ~

Deploy a Python (Django or Flask) web app to Azure App Services from Windows

Deploy the same application on Linux/MAC

More ‘az webapp up’ cli options

How to install the Azure CLI

Deploying Azure Apps using CLI