https://prefect.io logo
Title
p

Pinakpani Mukherjee

04/23/2022, 10:32 AM
Hello. I was trying to run prefect locally with a local postgres install. I set up the config.toml
[server.database]
connection_url = "<postgres://prefect:prefect@localhost:5432/postgres>"
The problem that I am currently having now is that after putting in
prefect server start -ep
, Hasura is not able to connect properly and throws errors. Is there anyway I can rectify and solve this issue?
a

Anna Geller

04/23/2022, 1:18 PM
Are you just getting started with Prefect? Perhaps it would be easier for you to start directly with Prefect 2.0 then. But if you want to use Prefect Server and Prefect 1.0 and use a local postgres database set up in Docker container, you can do:
prefect server start --expose --use-volume # will by default use volume '~/.prefect/pg_data

# for more information, run:
prefect server start --help
Or if you want to connect to an external DB (e.g. on AWS/GCP), you can attach external DB info this way:
prefect server start --expose --external-postgres --postgres-url postgres://<username>:<password>@hostname:<port>/<dbname>