# =============================================================================
# GoHorse Jobs Scraper - Python Dockerfile
# =============================================================================

FROM python:3.12-slim

WORKDIR /app

# Install dependencies
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

# Copy source
COPY . .

# Security: Run as non-root
RUN useradd -m -u 1001 scraper && \
    chown -R scraper:scraper /app

USER scraper

# Create output directory
RUN mkdir -p /app/output

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