FROM python:3.11-slim

# Instalar Chromium y dependencias
RUN apt-get update && apt-get install -y \
    chromium \
    chromium-driver \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app

# Copiar el proyecto
COPY . .

# Instalar dependencias
RUN pip install --no-cache-dir mcp requests beautifulsoup4 lxml selenium pytest

ENV BROWSER_ENGINE=selenium
ENV PYTHONUNBUFFERED=1

CMD ["python", "server.py"]
