This is an infrastructure-only template that doesn't include any application code. You can use it to quickly create the resources you need to deploy a data-driven Python app to Azure (for an example, see Deploy a Python (Django or Flask) web app with PostgreSQL in Azure). It provisions the following resources in an Azure resource group:
- A virtual network.
- A VNET-integrated App Service app.
- An Azure Database for PostgreSQL flexible server, accessible only from within the virtual network.
- An Azure Cache for Redis, accessible only from within the virtual network.
- A Log Analytics workspace to ship App Service logs.
To deploy your data-driven Python app, make sure you have installed AZD, and run the following commands and sequence and follow the prompts:
# CD to your Python app's repo root
cd <repo-root>
# Initialize a new azd environment with this template
azd init --template python-app-service-postgresql-infra
# Provision resources and deploy application code
azd up
When azd
has finished deploying, you'll see some helpful output as provided by the template
- An endpoint URI for the web app.
- A link to the resource group in the Azure portal.
- A list of app settings generated by the template, and link to the app settings page in the Azure portal.
- A link to open an SSH session with the web app. This is useful to run database migrations manually.
- A link to the App Service logs.
When you've made any changes to your application code, you can just run:
azd deploy
If you're working with this project and running into issues, please post in Issues.