FROM python:3.12-slim

# System deps for the backend project (so agent can validate imports/linting)
RUN apt-get update && apt-get install -y --no-install-recommends \
    git \
    curl \
    build-essential \
    default-libmysqlclient-dev \
    pkg-config \
    libmagic1 \
    tesseract-ocr \
    libgl1 \
    libglib2.0-0 \
    && rm -rf /var/lib/apt/lists/*

# Install shypmate Python deps + ruff for validation
# NOTE: test tools (pytest, jest, etc.) are NOT baked in — they're language-specific.
# Use test_dependencies in shypmate.yml or let the manager learn via .shypmate/manager.yml
COPY requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements.txt ruff && rm /tmp/requirements.txt

# Copy the shypmate framework into the image
# (the repo itself is cloned at runtime, but the framework code is baked in)
COPY . /opt/shypmate
# /opt so `import shypmate.*` works; /workspace for project imports after clone
ENV PYTHONPATH="/opt:/workspace"

WORKDIR /workspace

ENTRYPOINT ["python", "/opt/shypmate/entrypoint.py"]
