Files
Effi/effi-crawl4ai/README-INTEGRATION.md
Folzo 93f31cdaeb Ajout Effi-OCR (Tesseract) + Web Scraper pour OpenWebUI
- 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)
2026-04-06 16:34:27 +02:00

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 :

  1. Sauvegarder ton docker-compose.yml
  2. Ajouter le service Crawl4AI
  3. Démarrer le service
  4. Vérifier qu'il fonctionne

Option 2 : Manuel

  1. Sauvegarder le docker-compose existant :
cd /root/effi
cp docker-compose.yml docker-compose.yml.backup
  1. Éditer docker-compose.yml et ajouter avant la section networks: :
  # ─────────────────────────────────────────────────────────
  # 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
  1. Démarrer le service :
docker-compose up -d crawl4ai

Configuration OpenWebUI

  1. Aller dans Admin Panel → Tools → Web Search and Crawl → ⚙️
  2. Crawl4AI Base URL : http://localhost:11235
  3. Timeout : 30000
  4. 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-compose
  • add-to-effi.sh - Script d'installation automatique
  • README.md - Cette documentation

Intégration créée pour la stack Effi existante