Skip to content

Commit bc7b30d

Browse files
committed
wip
1 parent ecd2ae9 commit bc7b30d

2 files changed

+14
-9
lines changed

articles/python/tutorial-containerize-deploy-python-web-app-azure-03.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Azure CLI commands can be run in the [Azure Cloud Shell](https://shell.azure.com
7474
The command adds "azurecr.io" to the name to create the fully qualified registry name. If successful, you see the message "Login Succeeded".
7575
7676
> [!NOTE]
77-
> In the Azure Cloud Shell, the az `acr login command` is not necessary, as authentication is handled automatically through your Cloud Shell session. However, if you encounter authentication issues, you can still use it.
77+
> In the Azure Cloud Shell, the az `acr login command` isn't necessary, as authentication is handled automatically through your Cloud Shell session. However, if you encounter authentication issues, you can still use it.
7878
7979
## Build an image in Azure Container Registry
8080
@@ -86,10 +86,14 @@ You can generate the container image directly in Azure through various approache
8686
Azure CLI commands can be run in your local development environment with the [Azure CLI installed](/cli/azure/install-azure-cli) or in [Azure Cloud Shell](https://shell.azure.com/).
8787
8888
1. In the console, navigate to the root folder for your cloned repository from part 2 of this tutorial series.
89+
8990
1. Build the container image using the [az acr build](/cli/azure/acr#az-acr-build) command.
9091
9192
```azurecli-interactive
9293
az acr build -r $REGISTRY_NAME -g $RESOURCE_GROUP_NAME -t msdocspythoncontainerwebapp:latest .
94+
# When using Azure Cloud Shell, run one of the following commands instead:
95+
# az acr build -r $REGISTRY_NAME -g $RESOURCE_GROUP_NAME -t msdocspythoncontainerwebapp:latest https://github.com/Azure-Samples/msdocs-python-django-container-web-app.git
96+
# az acr build -r $REGISTRY_NAME -g $RESOURCE_GROUP_NAME -t msdocspythoncontainerwebapp:latest https://github.com/Azure-Samples/msdocs-python-flask-container-web-app.git
9397
```
9498
9599
The last argument in the command is the fully qualified path to the repo. When running in Azure Cloud Shell, use https://github.com/Azure-Samples/msdocs-python-django-container-web-app.git for the Django sample app and https://github.com/Azure-Samples/msdocs-python-flask-container-web-app.git for the Flask sample app.

articles/python/tutorial-containerize-deploy-python-web-app-azure-04.md

+9-8
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Azure CLI commands can be run in the [Azure Cloud Shell](https://shell.azure.com
3636

3737
RESOURCE_GROUP_NAME should still be set in your environment to the resource group name you used in parts 2 and 3 of this tutorial series. Build container in Azure of this tutorial. If it isn't, uncomment the first line and set it to the name you used.
3838

39-
### [Bashl](#tab/bash)
39+
### [Bash](#tab/bash)
4040

4141
```azurecli-interactive
4242
#!/bin/bash
@@ -68,7 +68,7 @@ Azure CLI commands can be run in the [Azure Cloud Shell](https://shell.azure.com
6868
6969
1. Create an App Service plan with the [az appservice plan create](/cli/azure/appservice/plan#az-appservice-plan-create) command.
7070
71-
### [Bashl](#tab/bash)
71+
### [Bash](#tab/bash)
7272
7373
```azurecli-interactive
7474
#!/bin/bash
@@ -106,7 +106,7 @@ Azure CLI commands can be run in the [Azure Cloud Shell](https://shell.azure.com
106106
* CONTAINER_NAME is of the form "yourregistryname.azurecr.io/repo_name:tag".
107107
* REGISTRY_NAME should still be set in your environment to the registry name you used in part **3. Build container in Azure** of this tutorial. If necessary, uncomment the line where it's set in the code snippet and set it to the name you used.
108108
109-
### [Bashl](#tab/bash)
109+
### [Bash](#tab/bash)
110110
111111
```azurecli-interactive
112112
#!/bin/bash
@@ -160,7 +160,7 @@ Azure CLI commands can be run in the [Azure Cloud Shell](https://shell.azure.com
160160
161161
1. Configure the web app to use managed identities to pull from the Azure Container Registry with the [az webapp config set](/cli/azure/webapp/config#az-webapp-config-set) command.
162162
163-
### [Bashl](#tab/bash)
163+
### [Bash](#tab/bash)
164164
165165
```azurecli-interactive
166166
#!/bin/bash
@@ -186,7 +186,7 @@ Azure CLI commands can be run in the [Azure Cloud Shell](https://shell.azure.com
186186
187187
1. Get the application scope credential with the [az webapp deployment list-publishing-credentials](/cli/azure/webapp/deployment#az-webapp-deployment-list-publishing-credentials) command.
188188
189-
### [Bashl](#tab/bash)
189+
### [Bash](#tab/bash)
190190
191191
```azurecli-interactive
192192
#!/bin/bash
@@ -214,7 +214,7 @@ Azure CLI commands can be run in the [Azure Cloud Shell](https://shell.azure.com
214214
215215
1. Use the application scope credential to create a webhook with the [az acr webhook create](/cli/azure/acr/webhook#az-acr-webhook-create) command.
216216
217-
### [Bashl](#tab/bash)
217+
### [Bash](#tab/bash)
218218
219219
```azurecli-interactive
220220
#!/bin/bash
@@ -255,7 +255,7 @@ To set environment variables in App Service, you create *app settings* with the
255255
* DB_NAME: Use "restaurants_reviews".
256256
* COLLECTION_NAME: Use "restaurants_reviews".
257257
258-
### [Bashl](#tab/bash)
258+
### [Bash](#tab/bash)
259259
260260
```azurecli-interactive
261261
#!/bin/bash
@@ -269,7 +269,7 @@ To set environment variables in App Service, you create *app settings* with the
269269
--settings CONNECTION_STRING=$MONGO_CONNECTION_STRING \
270270
DB_NAME=$MONGO_DB_NAME \
271271
COLLECTION_NAME=$MONGO_COLLECTION_NAME \
272-
SECRET_KEY='supersecretkeythatispassedtopythonapp'
272+
SECRET_KEY="supersecretkeythatispassedtopythonapp"
273273
```
274274
275275
### [Powershell](#tab/powershell)
@@ -383,6 +383,7 @@ To configure environment variables for the web app from VS Code, you must have t
383383
* DB_NAME: Use "restaurants_reviews".
384384
* COLLECTION_NAME: Use "restaurants_reviews".
385385
* WEBSITES_PORT: Use "8000" for Django and "5000" for Flask. This environment variable specifies the port on which the container is listening.
386+
* SECRET_KEY: Use "supersecretkeythatispassedtopythonapp".
386387

387388
## Browse the site
388389

0 commit comments

Comments
 (0)