Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
Hi @M R, Gouthami (623)
The recommended way to deploy a Flask application on Azure App Service is to use a Linux App Service with built-in Python runtime, since Python on Windows is no longer supported for new deployments. Ensure your project contains a main Flask file (for example, app.py) with the Flask instance exposed (app = Flask(__name__)) and a requirements.txt file listing all dependencies (pip freeze > requirements.txt). Test the application locally using a virtual environment and run it with flask run before deployment. You can then deploy directly from your project folder using Azure CLI with a command such as az webapp up --name <unique-app-name> --resource-group <resource-group> --runtime "PYTHON|3.9" --sku B1, which automatically creates the required App Service resources and deploys your code. After deployment, configure a startup command in Configuration >General Settings like gunicorn --bind=0.0.0.0:8000 app:app (format: <filename>:<FlaskAppObject>) and restart the app. You may also add environment variables under Application Settings and use Log Stream to troubleshoot startup issues.
https://learn.microsoft.com/en-us/azure/app-service/quickstart-python?tabs=flask%2Cwindows%2Cazure-cli%2Cazure-cli-deploy%2Cdeploy-instructions-azportal%2Cterminal-bash%2Cdeploy-instructions-zip-azcli
https://learn.microsoft.com/en-us/azure/app-service/configure-language-python
https://learn.microsoft.com/en-us/azure/app-service/tutorial-python-postgresql-app-flask?tabs=copilot&pivots=azure-portal
Let me know if you have any further assistance needed.