FROM python:3.12.10-alpine
RUN apk add --no-cache \
    ffmpeg \
    opus \
    opus-dev \
    build-base \
    libffi-dev \
    openssl-dev \
    musl-dev \
    python3-dev

WORKDIR /usr/src/app

COPY requirements.txt ./

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

COPY . .

RUN python -c "import discord.opus as opus; opus.load_opus(/usr/lib/libopus.so.0.10.1); print('✅ Opus loaded:', opus.is_loaded())"

CMD python bot.py

