FROM python:3.12-slim

WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
    gcc \
    && rm -rf /var/lib/apt/lists/*

# Copy requirements first for Docker layer caching
COPY pyproject.toml README.md ./
COPY spluspy/ spluspy/

# Install the package
RUN pip install --no-cache-dir ".[all]"

# Copy bot script if present
COPY bot.py ./

# Run the bot
CMD ["python", "bot.py"]
