FROM python:3.13-slim

# Zależności systemowe: opus dla głosu, ffmpeg do dekodowania audio
RUN apt-get update && apt-get install -y \
    libopus0 \
    libopus-dev \
    ffmpeg \
    build-essential \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app

# Zależności przed źródłami, aby korzystać z cache warstw.
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

EXPOSE 8000

# Serwis wystawia wyłącznie API i steruje botem - panel ma własny obraz.
CMD ["python", "-u", "main.py"]
