Docker compose to run Prefect 2.0 locally with Postgres

View in #show-us-what-you-got on Slack

Paco_Ibañez @Paco_Ibañez: Hello! I have being exploring Orion this week and I have put together a docker-compose to run Prefect 2.0 locally. I have tested it on mac and linux. The script runs prefect server, postgres, a docker agent, and minio to store flows. The start script configures a work queue and an example flow is included. Sharing in case someone finds it useful: https://github.com/fraibacas/prefect-orion

GitHub: GitHub - fraibacas/prefect-orion

Michael_Adkins @Michael_Adkins: Sweet!!

Jeremiah @Jeremiah: Great stuff @Paco_Ibañez!

Kevin_Kho @Kevin_Kho: Thanks for sharing!

Anna_Geller @Anna_Geller: Thanks for contributing! :tada: might be useful for Windows users actually, with docker-compose it should work (in theory)

Required Postgres configuration

to avoid sorting issues due to local settings

version: "3.8"
services:
  test-db:
    image: postgres:13
    ports:
      - 15432:5432
    environment:
      POSTGRES_USER: prefect
      POSTGRES_PASSWORD: prefect
      POSTGRES_DB: orion
      LANG: 'C.UTF-8'
      LANGUAGE: 'C.UTF-8'
      LC_ALL: 'C.UTF-8'
      LC_COLLATE: 'C.UTF-8'
      LC_CTYPE: 'C.UTF-8'
    tmpfs: /var/lib/postgresql/data
1 Like