hey prefect fam, do you have a docker compose temp...
# best-practices
j
hey prefect fam, do you have a docker compose template for running prefect 2 locally?
n
that should be roughly correct if you replace all instances of "orion" or "ORION" with "server" / "SERVER"
j
nice. this is great, thank you!
since prefect ships with sqlite, we can whack the postgres container entirely, yeah?
n
if you're cool with sqlite then yeah you wouldnt need pg around
1
j
i'm getting this error:
Copy code
^^^^^^^^^^
pipelines-orion-1     | sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked
pipelines-orion-1     | [SQL: DELETE FROM flow_run_notification_queue WHERE flow_run_notification_queue.id IN (SELECT 1 FROM (SELECT 1) WHERE 1!=1) RETURNING id]
pipelines-orion-1     | (Background on this error at: <https://sqlalche.me/e/20/e3q8>)
whether i try to use pg or not
Copy code
networks:
  prefect:
    name: prefect

services:
  prefect-server:
    image: prefecthq/prefect:2-python3.11
    command: prefect server start
    ports:
      - 4200:4200
    environment:
      PREFECT_API_URL: <http://127.0.0.1:4200/api>
    networks:
      - prefect
n
hmm i have seen that before with sqlite, when you're using pg, though have you set this?
Copy code
PREFECT_API_DATABASE_CONNECTION_URL="<postgresql+asyncpg://postgres:yourTopSecretPassword@localhost:5432/prefect>"
j
yeah.
fyi @Nate -- looks like that error is not problematic: https://github.com/PrefectHQ/prefect/issues/10956 can set this env var and it goes away with no problems:
PREFECT_API_SERVICES_FLOW_RUN_NOTIFICATIONS_ENABLED: false
n
oops, this dropped off my radar. oh - nice! glad you figured it out