# Cloud Run container image for llm-async x cloud-run. Uvicorn listens on
# $PORT (Cloud Run injects this; default 8080). Uses the standard slim base
# image because the SDK has no compiled dependencies.

FROM python:3.11-slim

WORKDIR /app

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

# Cloud Run sets PORT; fall back to 8080 for local docker compose runs.
ENV PORT=8080
EXPOSE 8080

CMD ["sh", "-c", "uvicorn server:app --host 0.0.0.0 --port ${PORT:-8080}"]
