You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this quickstart, you'll learn how to configure a Python app deployed on Azure App Service using the Azure CLI. This includes setting and checking the Python version, listing the supported Python versions for App Service, and customizing build automation during deployment.
14
14
15
-
---
15
+
16
16
17
17
## Prerequisites
18
18
@@ -22,13 +22,13 @@ Ensure you have the following:
22
22
-[Azure CLI installed](https://learn.microsoft.com/cli/azure/install-azure-cli) locally or access to [Azure Cloud Shell](https://ms.portal.azure.com/#cloudshell/).
23
23
- Permissions to manage resources in your Azure subscription.
24
24
25
-
---
25
+
26
26
27
27
## Step 1: Create necessary resources
28
28
29
29
The following commands create the required resources: a resource group, an App Service plan, and an App Service instance. **Random suffixes are included for resource names to avoid conflicts.**
30
30
31
-
---
31
+
32
32
33
33
### Create a resource group
34
34
@@ -57,7 +57,7 @@ Results:
57
57
}
58
58
```
59
59
60
-
---
60
+
61
61
62
62
### Create an App Service plan
63
63
@@ -86,7 +86,7 @@ Results:
86
86
}
87
87
```
88
88
89
-
---
89
+
90
90
91
91
### Create an App Service instance
92
92
@@ -109,7 +109,7 @@ Results:
109
109
}
110
110
```
111
111
112
-
---
112
+
113
113
114
114
## Step 2: Show the current Python version
115
115
@@ -127,7 +127,7 @@ Results:
127
127
"PYTHON|3.10"
128
128
```
129
129
130
-
---
130
+
131
131
132
132
## Step 3: Set the desired Python version
133
133
@@ -152,7 +152,7 @@ Results:
152
152
"PYTHON|3.11"
153
153
```
154
154
155
-
---
155
+
156
156
157
157
## Step 4: List all supported Python runtime versions
158
158
@@ -176,13 +176,13 @@ Results:
176
176
]
177
177
```
178
178
179
-
---
179
+
180
180
181
181
## Step 5: Customize build automation
182
182
183
183
Azure App Service automates the Python app-building process during deployment. These steps demonstrate how to configure or modify its behavior.
184
184
185
-
---
185
+
186
186
187
187
### Enable build automation
188
188
@@ -206,13 +206,13 @@ Results:
206
206
]
207
207
```
208
208
209
-
---
209
+
210
210
211
211
## Step 6: Add application settings
212
212
213
213
App settings in Azure App Service act as environment variables within your app. Below, we add and verify a sample setting.
214
214
215
-
---
215
+
216
216
217
217
### Add a new App Service environment variable
218
218
@@ -243,6 +243,6 @@ Results:
243
243
]
244
244
```
245
245
246
-
---
246
+
247
247
248
248
This quickstart provides a structured way to configure Python runtime settings, build automation, and other critical application settings for an Azure App Service instance using Azure CLI.
0 commit comments