James A
04/10/2024, 9:56 AMChris Guidry
04/10/2024, 1:25 PMJames A
04/10/2024, 1:45 PMPREFECT_API_DATABASE_CONNECTION_URL="postgresql+asyncpg://<db_user>:<db_pass>@<db_host>:<db_port>/<db_name>"
(this is me naively combining this and this, i.e. switching pg8000 for asyncpg and copying the Cloud SQL url format)Chris Guidry
04/10/2024, 1:50 PMprefect, or use it to create another user. When you start the prefect server with prefect server start, it will create the required database tables, etc.
You may want to provide your DB password in a separate variable, like this:
PREFECT_API_DATABASE_PASSWORD='mypassword'
PREFECT_API_DATABASE_CONNECTION_URL='postgresql+asyncpg://<db_user>:${PREFECT_API_DATABASE_PASSWORD}@<db_host>:<db_pass>/<db_name>'
This hides the password a little more and will format your connection string when it is used (just have to make sure to include that ${PREFECT_API_DATABASE_PASSWORD} part literallyJames A
04/15/2024, 9:37 AMChris Guidry
04/15/2024, 1:50 PMJames A
04/24/2024, 6:38 PM