# Invoice Match — Python service (FastAPI + Strands).
FROM python:3.12-slim

ENV PYTHONUNBUFFERED=1 \
    PYTHONDONTWRITEBYTECODE=1 \
    PIP_NO_CACHE_DIR=1

WORKDIR /app

# Install dependencies first for better layer caching.
COPY requirements.txt .
RUN pip install --upgrade pip && pip install -r requirements.txt

# Application code.
COPY app ./app

EXPOSE 8000

# `service` stays on the internal Docker network (CONTRACT §1); only web/app
# publishes a host port.
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
