upgrade_ragflow.mdx Documentation


Overview

The upgrade_ragflow.mdx file is a comprehensive upgrade guide document designed for users of the RAGFlow application. It provides detailed, step-by-step instructions on how to upgrade the RAGFlow system, including both its codebase and Docker images. The document explains upgrading to either the most recent nightly builds (nightly-slim or nightly) or to officially published releases. It also addresses important notes related to data persistence and volume management in Docker, and covers upgrade procedures in offline environments.

This file is primarily a Markdown-based documentation file with embedded React components (Tabs and TabItem) for interactive tabbed content, enhancing user experience by allowing users to switch easily between different upgrade image options.


Detailed Explanation of Content and Structure

1. Upgrade Overview Section

2. Upgrade to Nightly Builds

Functionality:

Steps:

  1. Clone the RAGFlow GitHub repo.

  2. Modify the .env file under ragflow/docker/ to specify which nightly image to use.

  3. Pull and restart the Docker image using docker compose.

Usage Example:

git clone https://github.com/infiniflow/ragflow.git
# Edit ragflow/docker/.env to set:
# RAGFLOW_IMAGE=infiniflow/ragflow:nightly-slim
docker compose -f docker/docker-compose.yml pull
docker compose -f docker/docker-compose.yml up -d

The document uses tabbed UI components to display the .env variable for each image variant, improving clarity and usability.

3. Upgrade to Official Releases

Functionality:

Steps:

  1. Clone the repo.

  2. Checkout the desired release tag.

  3. Update the .env file to specify the release image.

  4. Pull and restart the Docker container.

Usage Example:

git clone https://github.com/infiniflow/ragflow.git
git checkout -f v0.20.5
# Edit ragflow/docker/.env to set:
# RAGFLOW_IMAGE=infiniflow/ragflow:v0.20.5-slim
docker compose -f docker/docker-compose.yml pull
docker compose -f docker/docker-compose.yml up -d

Tabbed UI again facilitates switching between "slim" and "full" options.

4. Frequently Asked Questions (FAQs)


Important Implementation Details


Interaction with Other System Components


Visual Diagram: Flowchart of Upgrade Process

flowchart TD
    A[Start Upgrade Process]
    A --> B{Choose Upgrade Type}
    B --> C[Nightly Builds]
    B --> D[Official Releases]

    C --> E[Clone RAGFlow Repo]
    E --> F[Update ragflow/docker/.env for nightly image]
    F --> G[Pull latest Docker image]
    G --> H[Restart Docker containers]
    H --> I[Upgrade Complete]

    D --> J[Clone RAGFlow Repo]
    J --> K[Checkout release tag]
    K --> L[Update ragflow/docker/.env for release image]
    L --> M[Pull release Docker image]
    M --> N[Restart Docker containers]
    N --> I

    I --> O[Verify Upgrade Success]

Diagram Explanation:


Summary

The upgrade_ragflow.mdx is a user-facing documentation file providing precise instructions to safely upgrade the RAGFlow system. It ensures users understand the need to synchronize code and Docker images, the implications for data persistence, and how to handle upgrades in both connected and offline environments. The use of interactive tabs enhances clarity for different upgrade options, and the inclusion of FAQs addresses common concerns.

This file is essential for maintaining the RAGFlow application lifecycle and ensuring users can smoothly transition between versions without data loss.


End of Documentation for upgrade_ragflow.mdx