# 在 docker-compose.yml 中添加 RapidOCR 服务
# 将此内容添加到你的 docker-compose.yml 文件中

services:
  # ========================
  # RapidOCR Service (可选)
  # ========================
  # 快速准确的本地 OCR 服务
  rapidocr:
    image: xiaoshaizaiai/rapidocr:latest
    container_name: picanalysis-rapidocr
    restart: unless-stopped
    ports:
      - "8080:8080"
    networks:
      - picanalysis-network
    healthcheck:
      test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 20s

# 注意：还需要在 backend 服务的 environment 中添加：
# RAPIDOCR_API_URL: ${RAPIDOCR_API_URL:-http://rapidocr:8080}
# 并在 depends_on 中添加:
# - rapidocr
