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
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*:
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.
428
428
429
429
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.
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:
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).
438
438
439
439
## 4. Generate database schema
440
440
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.
442
442
443
443
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.
0 commit comments