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
Copy file name to clipboardExpand all lines: articles/app-service/tutorial-python-postgresql-app.md
+11-4Lines changed: 11 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -169,7 +169,14 @@ az postgres up --resource-group DjangoPostgres-tutorial-rg --location centralus
169
169
```
170
170
171
171
-**Replace***\<postgres-server-name>* with a name that's **unique across all Azure** (the server endpoint becomes `https://<postgres-server-name>.postgres.database.azure.com`). A good pattern is to use a combination of your company name and another unique value.
172
-
- For *\<admin-username>* and *\<admin-password>*, specify credentials to create an admin user for this Postgres server. The admin username can't be *azure_superuser*, *azure_pg_admin*, *admin*, *administrator*, *root*, *guest*, or *public*. It can't start with *pg_*. The password must contain **8 to 128 characters** from three of the following categories: English uppercase letters, English lowercase letters, numbers (0 through 9), and non-alphanumeric characters (for example, !, #, %). The password can't contain username.
172
+
- For *\<admin-username>* and *\<admin-password>*, specify credentials to create an admin user for this Postgres server.
173
+
- The admin username can't be *azure_superuser*, *azure_pg_admin*, *admin*, *administrator*, *root*, *guest*, or *public*. It can't start with *pg_*.
174
+
- The password must contain 8 to 128 characters from either:
175
+
- English uppercase letters.
176
+
- English lowercase letters.
177
+
- Numbers (0 through 9)
178
+
- Non-alphanumeric characters (for example, !, #, %).
179
+
- The password can't contain username.
173
180
- Don't use the `$` character in the username or password. Later you create environment variables with these values where the `$` character has special meaning within the Linux container used to run Python apps.
174
181
- The B_Gen5_1 (Basic, Gen5, 1 core) [pricing tier](../postgresql/concepts-pricing-tiers.md) used here is the least expensive. For production databases, omit the `--sku-name` argument to use the GP_Gen5_2 (General Purpose, Gen 5, 2 cores) tier instead.
175
182
@@ -261,7 +268,7 @@ This command does the following actions, which may take a few minutes:
261
268
- Create the App Service app if it doesn't exist.
262
269
- Allow default logging for the app, if not already enabled.
263
270
- Upload the repository using ZIP deployment with build automation enabled.
264
-
- Cache common parameters, such as the name of the resource group and App Service plan, into the file *.azure/config*. As a result, you don't need to specify again all the same parameters with later commands. For example, to redeploy the app after making changes, you can just run `az webapp up` again without any parameters. Commands that come from CLI extensions, such as `az postgres up` don't at present use the cache, which is why you must specify the resource group and location here with the initial use of `az webapp up`.
271
+
- Cache common parameters, such as the name of the resource group and App Service plan, into the file *.azure/config*. As a result, you don't need to specify again all the same parameters with later commands. For example, to redeploy the app after making changes, you can just run `az webapp up` again without any parameters. Commands that come from CLI extensions, such as `az postgres up` don't use the cache now, which is why you must specify the resource group and location here with the initial use of `az webapp up`.
265
272
266
273
::: zone-end
267
274
@@ -345,7 +352,7 @@ Django database migrations ensure that the schema in the PostgreSQL on Azure dat
345
352
az webapp ssh
346
353
```
347
354
348
-
If you can't connect to the SSH session, then the app itself has failed to start. [Check the diagnostic logs](#6-stream-diagnostic-logs) for details. For example, if you haven't created the necessary app settings in the previous section, the logs will indicate `KeyError: 'DBNAME'`.
355
+
If you can't connect to the SSH session, then the app itself has failed to start. [Check the diagnostic logs](#6-stream-diagnostic-logs) for details. For example, if you haven't created the necessary app settings in the previous section, the logs indicate `KeyError: 'DBNAME'`.
349
356
350
357
1. In the SSH session, run the following commands (you can paste commands using **Ctrl**+**Shift**+**V**):
351
358
@@ -373,7 +380,7 @@ Having issues? Refer first to the [Troubleshooting guide](configure-language-pyt
373
380
az webapp browse
374
381
```
375
382
376
-
If you see "Application Error", then it's likely that you either didn't create the required settings in the previous step, [Configure environment variables to connect the database](#42-configure-environment-variables-to-connect-the-database), or that those value contain errors. Run the command `az webapp config appsettings list` to check the settings. You can also [check the diagnostic logs](#6-stream-diagnostic-logs) to see specific errors during app startup. For example, if you didn't create the settings, the logs will show the error, `KeyError: 'DBNAME'`.
383
+
If you see "Application Error", then it's likely that you either didn't create the required settings in the previous step, [Configure environment variables to connect the database](#42-configure-environment-variables-to-connect-the-database), or that those value contain errors. Run the command `az webapp config appsettings list` to check the settings. You can also [check the diagnostic logs](#6-stream-diagnostic-logs) to see specific errors during app startup. For example, if you didn't create the settings, the logs show the error, `KeyError: 'DBNAME'`.
377
384
378
385
After updating the settings to correct any errors, give the app a minute to restart, then refresh the browser.
0 commit comments