Features Added: • Docker containerization with multi-stage Python 3.12 build • Caddy reverse proxy integration with automatic SSL • File upload interface for .claude.json imports with preview • Comprehensive hook system with 39+ hook types across 9 categories • Complete documentation system with Docker and import guides Technical Improvements: • Enhanced database models with hook tracking capabilities • Robust file validation and error handling for uploads • Production-ready Docker compose configuration • Health checks and resource limits for containers • Database initialization scripts for containerized deployments Documentation: • Docker Deployment Guide with troubleshooting • Data Import Guide with step-by-step instructions • Updated Getting Started guide with new features • Enhanced documentation index with responsive grid layout 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
53 lines
1.3 KiB
Docker
53 lines
1.3 KiB
Docker
# Use Python 3.12 slim image
|
|
FROM python:3.12-slim
|
|
|
|
# Set environment variables
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
UV_CACHE_DIR=/tmp/uv-cache
|
|
|
|
# Install system dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
curl \
|
|
git \
|
|
build-essential \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install uv
|
|
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
|
|
|
|
# Create app directory
|
|
WORKDIR /app
|
|
|
|
# Copy dependency files and README first for better caching
|
|
COPY pyproject.toml uv.lock README.md ./
|
|
|
|
# Install dependencies
|
|
RUN uv sync --frozen --no-cache --no-dev
|
|
|
|
# Copy application code
|
|
COPY . .
|
|
|
|
# Create data directory for SQLite database with proper permissions
|
|
RUN mkdir -p /app/data && chmod 777 /app/data
|
|
|
|
# Expose port
|
|
EXPOSE 8000
|
|
|
|
# Health check
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
|
|
CMD curl -f http://localhost:8000/health || exit 1
|
|
|
|
# Copy initialization script
|
|
COPY init_db.py ./
|
|
|
|
# Create startup script
|
|
RUN echo '#!/bin/bash\n\
|
|
echo "Ensuring database is initialized..."\n\
|
|
/app/.venv/bin/python init_db.py\n\
|
|
echo "Starting application..."\n\
|
|
exec /app/.venv/bin/python -m uvicorn main:app --host 0.0.0.0 --port 8000' > start.sh && \
|
|
chmod +x start.sh
|
|
|
|
# Run the application
|
|
CMD ["./start.sh"] |