Skip to content

Commit 5591300

Browse files
committed
remove unused images -- fix db schema image 2 to have fastapi command
1 parent 2bbbfc8 commit 5591300

10 files changed

+4
-2
lines changed
-36.7 KB
Loading

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,9 @@ Having issues? Check the [Troubleshooting guide](configure-language-python.md#tr
257257

258258
## 4. Generate database schema
259259

260-
With the PostgreSQL database protected by the virtual network, the easiest way to run [FastAPI database migrations](https://flask-migrate.readthedocs.io/en/latest/) is in an SSH session with the App Service container.
260+
In previous section, you added *src/entrypoint.sh* as the startup command for your app. *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.
261+
262+
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.
261263

262264
:::row:::
263265
:::column span="2":::
@@ -481,7 +483,7 @@ In this section, you'll run this command manually for demonstration purposes. Wi
481483

482484
1. In the SSH terminal, run `python3 src/fastapi_app/seed_data.py`. If it succeeds, App Service is [connecting successfully to the database](#i-get-an-error-when-running-database-migrations).
483485

484-
:::image type="content" source="./media/tutorial-python-postgresql-app-fastapi/azure-portal-generate-db-schema-flask-2.png" alt-text="A screenshot showing the commands to run in the SSH shell and their output (FastAPI)." lightbox="./media/tutorial-python-postgresql-app-fastapi/azure-portal-generate-db-schema-flask-2.png":::
486+
:::image type="content" source="./media/tutorial-python-postgresql-app-fastapi/azure-portal-generate-db-schema-fastapi-2.png" alt-text="A screenshot showing the commands to run in the SSH shell and their output (FastAPI)." lightbox="./media/tutorial-python-postgresql-app-fastapi/azure-portal-generate-db-schema-fastapi-2.png":::
485487

486488
> [!NOTE]
487489
> Only changes to files in `/home` can persist beyond app restarts. Changes outside of `/home` aren't persisted.

0 commit comments

Comments
 (0)