services:
  repro_db:
    image: mariadb:12
    environment:
      MARIADB_ROOT_PASSWORD: password
      MARIADB_DATABASE: testdb
      MARIADB_USER: test
      MARIADB_PASSWORD: password
    healthcheck:
      test: ["CMD", "mariadb-admin", "ping", "-h", "localhost", "-utest", "-ppassword"]
      interval: 5s
      retries: 10

  repro:
    image: python:3.13-slim
    volumes:
      - ./reproduce.py:/app/reproduce.py
    working_dir: /app
    command: >
      sh -c "pip install --quiet 'mariadb[binary]==2.0.0rc2' 'sqlalchemy>=2.0' && python reproduce.py"
    depends_on:
      repro_db:
        condition: service_healthy
    environment:
      DB_HOST: repro_db
      DB_USER: test
      DB_PASSWORD: password
      DB_NAME: testdb
