content: FROM python:3.12-slim
  
  ENV PYTHONDONTWRITEBYTECODE=1 \
      PYTHONUNBUFFERED=1 \
      PIP_NO_CACHE_DIR=1 \
      PIP_DISABLE_PIP_VERSION_CHECK=1
  
  WORKDIR /app
  
  # Install Python dependencies first (better layer caching)
  COPY backend/requirements.txt /tmp/requirements.txt
  RUN pip install --no-cache-dir -r /tmp/requirements.txt
  
  # Copy the backend source
  COPY backend /app
  
  # Optional: set defaults (can be overridden by Compose env_file)
  ENV HOST=0.0.0.0 PORT=8000
  
  EXPOSE 8000
  
  # Start FastAPI
  CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]