Skip to content

Commit 1124715

Browse files
Merge pull request #263859 from mksuni/fix-django-doc
Fix django doc web app and postgres
2 parents 978b3e1 + 7d10fb5 commit 1124715

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

articles/postgresql/flexible-server/tutorial-django-app-service-postgres.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ author: sunilagarwal
88
ms.reviewer: ""
99
ms.devlang: azurecli
1010
ms.topic: tutorial
11-
ms.date: 11/30/2021
11+
ms.date: 1/22/2024
1212
ms.custom: mvc, devx-track-azurecli
1313
---
1414

@@ -105,13 +105,15 @@ Create an App Service app (the host process) with the [az webapp up](/cli/azure/
105105
```azurecli
106106
# Create a web app
107107
108-
az webapp up --resource-group myresourcegroup --location westus2 --plan DjangoPostgres-tutorial-plan --sku B1 --name <app-name>
108+
az webapp up --resource-group myresourcegroup --location westus2 --plan DjangoPostgres-tutorial-plan --sku S1 --name <app-name>
109109
110-
# Enable VNET integration for web app.
110+
# Create subnet for web app
111111
112-
# Replace <vnet-name> and <subnet-name> with the virtual network and subnet name that the Azure Database for PostgreSQL flexible server instance is using.
112+
az network vnet subnet create --name <webapp-subnet-name> --resource-group myresourcegroup --vnet-name <vnet-name>
113113
114-
az webapp vnet-integration add -g myresourcegroup -n mywebapp --vnet <vnet-name> --subnet <subnet-name>
114+
# Replace <vnet-name> with the virtual network created when creating Azure Database for PostgreSQL flexible server. Replace <webapp-subnet-name> to replace with the subnet created for web app.
115+
116+
az webapp vnet-integration add -g myresourcegroup -n mywebapp --vnet <vnet-name> --subnet <weabpp-subnet-name>
115117
116118
# Configure database information as environment variables
117119
@@ -121,7 +123,7 @@ az webapp config appsettings set --settings DJANGO_ENV="production" DBHOST="<pos
121123
```
122124
- For the `--location` argument, use the same location as you did for the database in the previous section.
123125
- Replace *\<app-name>* with a unique name across all Azure (the server endpoint is `https://<app-name>.azurewebsites.net`). Allowed characters for *\<app-name>* are `A`-`Z`, `0`-`9`, and `-`. A good pattern is to use a combination of your company name and an app identifier.
124-
- Create the [App Service plan](../../app-service/overview-hosting-plans.md) *DjangoPostgres-tutorial-plan* in the Basic pricing tier (B1), if it doesn't exist. `--plan` and `--sku` are optional.
126+
- Create the [App Service plan](../../app-service/overview-hosting-plans.md) *DjangoPostgres-tutorial-plan* in the Standard pricing tier (S1), if it doesn't exist. `--plan` and `--sku` are optional.
125127
- Create the App Service app if it doesn't exist.
126128
- Enable default logging for the app, if not already enabled.
127129
- Upload the repository using ZIP deployment with build automation enabled.

0 commit comments

Comments
 (0)