docker-compose-CN-oc9.yml


Overview

The docker-compose-CN-oc9.yml file is a Docker Compose configuration designed to orchestrate containerized services for the RAGFlow application, specifically tailored for a certain deployment environment (likely China, as suggested by the CN in the filename) and version oc9. It extends a base Docker Compose configuration (docker-compose-base.yml) by including it and then adds a customized service definition for the ragflow server.

This file is not actively maintained by the RAGFlow team and is provided as-is, with a note encouraging users to submit pull requests for improvements if needed.

The primary functionality includes:


Detailed Explanation

Included File

include:
  - ./docker-compose-base.yml

Services

ragflow Service

ragflow:
  depends_on:
    mysql:
      condition: service_healthy
  image: edwardelric233/ragflow:oc9
  container_name: ragflow-server
  ports:
    - ${SVR_HTTP_PORT}:9380
    - 80:80
    - 443:443
  volumes:
    - ./ragflow-logs:/ragflow/logs
    - ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf
    - ./nginx/proxy.conf:/etc/nginx/proxy.conf
    - ./nginx/nginx.conf:/etc/nginx/nginx.conf
  env_file: .env
  environment:
    - TZ=${TIMEZONE}
    - HF_ENDPOINT=${HF_ENDPOINT}
    - MACOS=${MACOS}
  networks:
    - ragflow
  restart: on-failure
  extra_hosts:
    - "host.docker.internal:host-gateway"

Parameters and Configuration

Usage Example

To deploy the ragflow service using this compose file, assuming Docker Compose is installed and the environment variables are set, run:

docker-compose -f docker-compose-CN-oc9.yml up -d

This command will:


Important Implementation Details


Interaction with Other Parts of the System


Mermaid Diagram

The following flowchart illustrates the relationships and main components defined or referenced in docker-compose-CN-oc9.yml:

flowchart TD
    A[docker-compose-CN-oc9.yml] -->|includes| B[docker-compose-base.yml]
    B --> C[mysql service]
    A --> D[ragflow service]
    D -->|depends_on healthy| C
    D --> E[Mount ./ragflow-logs to /ragflow/logs]
    D --> F[Mount ./nginx/*.conf to /etc/nginx/]
    D --> G[Uses image edwardelric233/ragflow:oc9]
    D --> H[Ports: ${SVR_HTTP_PORT}:9380, 80:80, 443:443]
    D --> I[Environment vars from .env + TZ, HF_ENDPOINT, MACOS]
    D --> J[Network: ragflow]
    D --> K[Restart policy: on-failure]
    D --> L[Extra hosts: host.docker.internal -> host-gateway]

Summary

This file serves as a focused deployment descriptor for the RAGFlow server, making container orchestration predictable and environment-specific.