services:
  postgres:
    image: ghcr.io/trickle-labs/pg_trickle:latest
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: playground
      POSTGRES_DB: playground
    ports:
      - "5432:5432"
    volumes:
      - ./seed.sql:/docker-entrypoint-initdb.d/01-seed.sql:ro
      - pgdata:/var/lib/postgresql
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres -d playground"]
      interval: 2s
      timeout: 5s
      retries: 10

volumes:
  pgdata:
