Files
kennethreitz.org/Dockerfile
T
kennethreitz f50dad4574 Switch to uvicorn, fix breadcrumbs for all content pages
- Replace gunicorn/gevent with uvicorn for ASGI support
- Add asgiref to wrap Flask WSGI app for uvicorn compatibility
- Enable auto-reload in docker-compose for development
- Add current_path to all content render_template calls
- Simplify breadcrumb template to exclude current page
- Only show breadcrumbs for nested paths (> 1 segment)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 16:58:17 -05:00

31 lines
815 B
Docker

FROM astral/uv:python3.14-bookworm
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
UV_SYSTEM_PYTHON=1
WORKDIR /app
# Install system dependencies for WeasyPrint (PDF generation)
RUN apt-get update && apt-get install -y \
libcairo2 \
libpango-1.0-0 \
libpangocairo-1.0-0 \
libgdk-pixbuf2.0-0 \
libffi-dev \
shared-mime-info \
&& rm -rf /var/lib/apt/lists/*
# Copy dependency files and required package files
COPY pyproject.toml README.md ./
COPY tuftecms ./tuftecms
# Install dependencies directly without creating a venv (since we're in a container)
RUN uv pip install . --system
# Copy the rest of the application
COPY . .
# Run uvicorn directly (no need for uv run since we installed system-wide)
CMD ["uvicorn", "engine:app", "--host", "0.0.0.0", "--port", "8000"]