Skip to content

Commit 1646ca4

Browse files
committed
fix formatting of code snips
1 parent bb9a9d3 commit 1646ca4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

articles/app-service/tutorial-python-postgresql-app-fastapi.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -416,29 +416,29 @@ The azd template generates the connectivity variables for you as [app settings](
416416
417417
1. In the `infra/resources.bicep` file, find the app settings and find the setting for `AZURE_POSTGRESQL_CONNECTIONSTRING`.
418418
419-
:::code language="python" source="~/msdocs-fastapi-postgresql-sample-app/infra/resources.bicep" range="180-188" highlight="5":::
419+
:::code language="python" source="~/msdocs-fastapi-postgresql-sample-app/infra/resources.bicep" range="180-188" highlight="5":::
420420
421421
1. `AZURE_POSTGRESQL_CONNECTIONSTRING` contains the connection string to the Postgres database in Azure. You need to use it in your code to connect to it. You can find the code that uses this environment variable in *src/fastapi/models.py*:
422422
423-
:::code language="python" source="~/msdocs-fastapi-postgresql-sample-app/src/fastapi_app/models.py" range="9-36" highlight="4-16":::
423+
:::code language="python" source="~/msdocs-fastapi-postgresql-sample-app/src/fastapi_app/models.py" range="9-36" highlight="4-16":::
424424
425425
## 3. Examine the startup command
426426
427427
Azure App Service requires a startup command to run your FastAPI app. The azd template sets this command for you in your App Service instance.
428428
429429
1. In the `infra/resources.bicep` file, find the declaration for your web site and then find the setting for `appCommandLine`. This is the setting for your startup command.
430430
431-
:::code language="python" source="~/msdocs-fastapi-postgresql-sample-app/infra/resources.bicep" range="160-178" highlight="12":::
431+
:::code language="python" source="~/msdocs-fastapi-postgresql-sample-app/infra/resources.bicep" range="160-178" highlight="12":::
432432
433433
1. The startup command runs the file *src/entrypoint.sh*. Examine the code in that file to understand the commands that App Service runs to start your app:
434434
435-
:::code language="python" source="~/msdocs-fastapi-postgresql-sample-app/src/entrypoint.sh" range="1-6":::
435+
:::code language="python" source="~/msdocs-fastapi-postgresql-sample-app/src/entrypoint.sh" range="1-6":::
436436
437437
To learn more about app configuration and startup in App Service, see [Configure a Linux Python app for Azure App Service](configure-language-python.md).
438438
439439
## 4. Generate database schema
440440
441-
You may have noticed in the previous section that *entrypoint.sh* contains the following line:`python3 src/fastapi_app/seed_data.py`. This command migrates your database. In the sample app, it only ensures that the correct tables are created in your database. It doesn't populate these tables with any data.
441+
You may have noticed in the previous section that *entrypoint.sh* contains the following line: `python3 src/fastapi_app/seed_data.py`. This command migrates your database. In the sample app, it only ensures that the correct tables are created in your database. It doesn't populate these tables with any data.
442442

443443
In this section, you'll run this command manually for demonstration purposes. With the PostgreSQL database protected by the virtual network, the easiest way to run the command is in an SSH session with the App Service container.
444444

0 commit comments

Comments
 (0)