- Effi-OCR: Service OCR avec Tesseract (multilingue FR/EN) * API FastAPI sur port 8300 * Prétraitement images (contraste, niveaux de gris) * Tool OpenWebUI intégré - Web Scraper: Service Python (BeautifulSoup) sur port 11235 * Alternative à Crawl4AI (incompatible ARM64/J5040) * Scraping HTML basique mais fonctionnel * Intégré au docker-compose d'effi-server - Documentation: * ROADMAP-FONCTIONNALITES.md: Plan des 9 fonctionnalités * WEB-SCRAPER-CONFIG.md: Configuration OpenWebUI * WEB-SCRAPER-TOOL.md: Code du Tool - Script start-all-services.sh mis à jour (6 services)
3.9 KiB
3.9 KiB
Crawl4AI - Intégration Effi Server
Intégration du service Crawl4AI au docker-compose existant de /root/effi/.
Architecture
┌─────────────────────────────────────────────────────────┐
│ effi-server │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ OpenWebUI │ │ Qdrant │ │ Crawl4AI │ │
│ │ :3000 │ │ :6333 │ │ :11235 │ │
│ └──────┬──────┘ └─────────────┘ └──────┬──────┘ │
│ │ │ │
│ └──────────────────────────────────┘ │
│ Réseau: effi-net │
└─────────────────────────────────────────────────────────┘
Installation
Option 1 : Script automatique (recommandé)
Sur effi-server, dans /root/effi/ :
cd /root/effi
# Copier le script add-to-effi.sh ici
# Puis exécuter :
bash add-to-effi.sh
Le script va :
- Sauvegarder ton docker-compose.yml
- Ajouter le service Crawl4AI
- Démarrer le service
- Vérifier qu'il fonctionne
Option 2 : Manuel
- Sauvegarder le docker-compose existant :
cd /root/effi
cp docker-compose.yml docker-compose.yml.backup
- Éditer
docker-compose.ymlet ajouter avant la sectionnetworks::
# ─────────────────────────────────────────────────────────
# 8. CRAWL4AI - Web Scraping pour OpenWebUI
# → http://localhost:11235 (accessible depuis OpenWebUI)
# ─────────────────────────────────────────────────────────
crawl4ai:
image: unclecode/crawl4ai:basic
container_name: crawl4ai
restart: unless-stopped
ports:
- "11235:11235"
environment:
- CRAWL4AI_API_TOKEN=${CRAWL4AI_API_TOKEN:-}
- MAX_CONCURRENT_TASKS=3
- CRAWL4AI_ENABLE_GPU=false
volumes:
- /dev/shm:/dev/shm
deploy:
resources:
limits:
memory: 2G
reservations:
memory: 512M
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:11235/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
networks:
- effi-net
- Démarrer le service :
docker-compose up -d crawl4ai
Configuration OpenWebUI
- Aller dans Admin Panel → Tools → Web Search and Crawl → ⚙️
- Crawl4AI Base URL :
http://localhost:11235 - Timeout :
30000 - Activer le Tool ✅
Vérification
# Sur effi-server
curl http://localhost:11235/health
# Résultat attendu : {"status":"healthy"}
Test
Dans OpenWebUI :
"Effi, cherche les dernières nouvelles sur Linux et résume-moi un article"
Troubleshooting
Le service ne démarre pas :
docker logs crawl4ai
docker-compose ps
Timeout : Augmenter la valve à 60000 dans OpenWebUI
Mémoire : Le service est limité à 2GB (suffisant pour la plupart des sites)
Fichiers
crawl4ai-service-to-add.yml- Contenu à ajouter au docker-composeadd-to-effi.sh- Script d'installation automatiqueREADME.md- Cette documentation
Intégration créée pour la stack Effi existante