FROM python:3.11-slim

WORKDIR /app

# Install system dependencies if required for asyncpg/redis
RUN apt-get update && apt-get install -y --no-install-recommends \
    curl build-essential \
    && rm -rf /var/lib/apt/lists/*

# Install uv manually or copy from an official image (harder to assume in simple example)
RUN pip install fastapi uvicorn redis asyncpg

COPY main.py .

CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
