FROM python:3.11-slim

WORKDIR /app

RUN apt-get update && apt-get install -y --no-install-recommends \
    curl \
    && rm -rf /var/lib/apt/lists/*

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY bbpPairings.exe /usr/local/bin/bbpPairings.exe
RUN chmod +x /usr/local/bin/bbpPairings.exe

ENV BBP_PATH=/usr/local/bin/bbpPairings.exe

COPY swiss_calc/ /app/swiss_calc/
COPY bots/ /app/bots/

RUN mkdir -p /app/data

RUN python3 -c "from swiss_calc import parser; print('Module loaded')"
