az webapp
<-- Create Postgres database in Azure -->
<-- Install the db-up extension for the Azure CLI: -->
az extension add --name db-up
az postgres up --resource-group DjangoPostgres-tutorial-rg --location westus2 --sku-name B_Gen5_1 --server-name <postgres-server-name> --database-name <database name> --admin-user <admin-username> --admin-password <admin-password> --ssl-enforcement Enabled
<-- Create an App Service app (the host process) with the az webapp up command: -->
az webapp up --resource-group DjangoPostgres-tutorial-rg --location westus2 --plan DjangoPostgres-tutorial-plan --sku B1 --name <app-name>
<-- To set environment variables in App Service -->
az webapp config appsettings set --settings DBHOST="<postgres-server-name>" DBNAME="pollsdb" DBUSER="<username>" DBPASS="<password>"
Redeploy
az webapp up
#