Build preloads models to /root/.cache/huggingface (HF default).
Volume must mount there too, not a separate /models path.
Remove HF_HOME env override to keep paths consistent.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add docling_models volume mounted at /models in container
- Set HF_HOME=/models/huggingface at runtime (via docker-compose env)
- Models download once → persist in volume → survive container rebuilds
- Build-time preload uses || to not block build if network unavailable
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add IBM Docling as a Python FastAPI microservice for high-quality document
parsing with table structure recognition (TableFormer ~94% accuracy) and
OCR support, replacing pdf-parse/mammoth as the primary text extractor.
Architecture:
- New docling-service (Python FastAPI, port 3007) in Docker network
- knowledge-service calls docling-service via HTTP POST multipart/form-data
- Graceful fallback: if Docling fails, falls back to pdf-parse/mammoth
- Text/Markdown files skip Docling (no benefit for plain text)
Changes:
- New: packages/services/docling-service/ (main.py, Dockerfile, requirements.txt)
- docker-compose.yml: add docling-service, wire DOCLING_SERVICE_URL to
knowledge-service, add missing FILE_SERVICE_URL to conversation-service
- text-extraction.service.ts: inject ConfigService, add extractViaDocling()
with automatic fallback to legacy extractors
- .env.example: add FILE_SERVICE_PORT/URL and DOCLING_SERVICE_PORT/URL
Inter-service communication map:
conversation-service → file-service (FILE_SERVICE_URL, attachments)
conversation-service → knowledge-service (KNOWLEDGE_SERVICE_URL, RAG)
knowledge-service → docling-service (DOCLING_SERVICE_URL, document parsing)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add SuperAdmin module for tenant management (CRUD, suspend/activate)
- Add tenant management REST API (/super-admin/tenants/*)
- Add user profile menu in ChatSidebar with dropdown
- Add ProfilePage and BindPhonePage for user account management
- Update init-db.sql with tenant_id columns for all 16 tables
- Add database seed script (scripts/seed.ts) with ts-node
- Integrate db:seed into deploy.sh rebuild command
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Both user-service and evolution-service need the same JWT_SECRET
to verify admin tokens correctly.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Change PostgreSQL image from postgres:15-alpine to pgvector/pgvector:pg15
- Add init_database() function to auto-detect and initialize database
- Add 'db init' command for manual database initialization
- Database init runs automatically on first 'start all' deployment
- Includes admin account creation and pgvector extension verification
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add MinIO object storage to docker-compose infrastructure
- Create file-service microservice for upload management with presigned URLs
- Add files table to database schema
- Update nginx and Kong for MinIO proxy routes
- Implement file upload UI in chat InputArea with drag-and-drop
- Add attachment preview in MessageBubble component
- Update conversation-service to handle multimodal messages
- Add Claude Vision API integration for image analysis
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add /health endpoints to all NestJS services (user, payment, knowledge, conversation, evolution)
- Fix nginx healthcheck to use 127.0.0.1 instead of localhost (IPv6 issue)
- Add healthcheck configuration to docker-compose for all backend services
- Use start_period to allow services time to initialize before health checks
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove https-proxy-agent dependency since ANTHROPIC_BASE_URL already
supports pointing to a proxy server directly.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add https-proxy-agent dependency
- Configure httpAgent in ClaudeAgentService when ANTHROPIC_PROXY_URL is set
- Add ANTHROPIC_PROXY_URL environment variable to docker-compose.yml
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove kong-database, kong-migrations, kong-init services
- Use KONG_DATABASE=off with declarative config file
- Add kong/kong.yml with all services, routes, and plugins
- Remove kong_data volume (no longer needed)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Organize infrastructure configs properly:
- nginx/ for Nginx configuration
- kong/ for Kong configuration
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update init-kong.sh with complete service/route configuration
- Add CORS plugin configuration with all required headers
- Add timeout settings (120s for conversation-service)
- Simplify docker-compose kong-init to use the script
- Add kong-migrations service for database bootstrap
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
TypeORM config reads individual POSTGRES_HOST, POSTGRES_PORT, etc.
environment variables instead of DATABASE_URL. Added these variables
to all backend services in docker-compose.yml.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>