Files
discord-fishbowl/Dockerfile.admin
root 5480219901 Fix comprehensive system issues and implement proper vector database backend selection
- Fix remaining datetime timezone errors across all database operations
- Implement dynamic vector database backend (Qdrant/ChromaDB) based on install.py configuration
- Add LLM timeout handling with immediate fallback responses for slow self-hosted models
- Use proper install.py configuration (2000 max tokens, 5min timeout, correct LLM endpoint)
- Fix PostgreSQL schema to use timezone-aware columns throughout
- Implement async LLM request handling with background processing
- Add configurable prompt limits and conversation history controls
- Start missing database services (PostgreSQL, Redis) automatically
- Fix environment variable mapping between install.py and application code
- Resolve all timezone-naive vs timezone-aware datetime conflicts

System now properly uses Qdrant vector database as specified in install.py instead of hardcoded ChromaDB.
Characters respond immediately with fallback messages during long LLM processing times.
All database timezone errors resolved with proper timestamptz columns.
2025-07-05 21:31:52 -07:00

57 lines
1.4 KiB
Docker

FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install Node.js for frontend build
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
&& apt-get install -y nodejs
# Copy requirements first for better caching
COPY requirements-admin.txt .
RUN pip install --no-cache-dir -r requirements-admin.txt
# Install additional dependencies needed for production
RUN pip install --no-cache-dir asyncpg python-dotenv
# Copy application code
COPY src/ ./src/
COPY config/ ./config/
COPY migrations/ ./migrations/
COPY alembic.ini ./
# Build frontend
COPY admin-frontend/ ./admin-frontend/
WORKDIR /app/admin-frontend
# Clear any existing node_modules and lock files
RUN rm -rf node_modules package-lock.json yarn.lock
# Install dependencies with npm (using .npmrc config)
RUN npm install
# Build with increased memory for Node.js
ENV NODE_OPTIONS="--max-old-space-size=4096"
# Build React app or create fallback
RUN npm run build || mkdir -p build
RUN test -f build/index.html || echo "<html><body><h1>Discord Fishbowl Admin</h1><p>Interface loading...</p></body></html>" > build/index.html
# Back to main directory
WORKDIR /app
# Create logs directory
RUN mkdir -p logs
# Set Python path
ENV PYTHONPATH=/app/src
# Expose admin port
EXPOSE 8000
# Run the admin interface
CMD ["python", "-m", "src.admin.app"]