FROM python:3.12-slim WORKDIR /app # Install uv for fast dependency management RUN pip install uv # Copy project files COPY pyproject.toml . COPY server.py . # Install dependencies RUN uv pip install --system -e . # Expose port EXPOSE 8000 # Health check HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ CMD python -c "import httpx; r = httpx.get('http://localhost:8000/health'); exit(0 if r.status_code == 200 else 1)" # Run server CMD ["python", "server.py"]