Files
kennethreitz.org/Dockerfile
T
kennethreitz 3d6dfae01b Refactor cache generation and improve metadata handling
- Updated docker-compose.yml to mount data directory for improved file access.
- Implemented a unified cache generation function in engine.py to streamline cache creation for blog posts, sidenotes, outlines, quotes, connections, and terms.
- Replaced individual cache extraction functions with a single MetadataCache class for cleaner access to cached data.
- Modified prebuild_cache.py to utilize the new unified cache function, ensuring all cache files are generated in a single sweep.
- Enhanced outlines.html template to simplify anchor URL generation for headings.
2025-09-16 19:37:23 -04:00

20 lines
571 B
Docker

FROM astral/uv:python3.13-bookworm
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
UV_SYSTEM_PYTHON=1
WORKDIR /app
# Copy dependency files first
COPY pyproject.toml ./
# Install dependencies directly without creating a venv (since we're in a container)
RUN uv sync
# Copy the rest of the application
COPY . .
# Run gunicorn directly (no need for uv run since we installed system-wide)
CMD ["uv", "run", "gunicorn", "--bind", "0.0.0.0:8000", "--worker-class", "gevent", "--workers", "1", "--worker-connections", "1000", "--timeout", "60", "engine:app"]