feat: add more Agent services & easytier
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
# Global Registry Prefix (optional)
|
||||
# GLOBAL_REGISTRY=
|
||||
|
||||
# Service Versions
|
||||
RAGFLOW_VERSION=v0.24.0
|
||||
ELASTICSEARCH_VERSION=8.11.3
|
||||
MYSQL_VERSION=8.0.39
|
||||
REDIS_VERSION=7
|
||||
MINIO_VERSION=RELEASE.2025-01-20T14-49-07Z
|
||||
|
||||
# Timezone
|
||||
TZ=UTC
|
||||
|
||||
# Host port for the RAGFlow web UI (Nginx reverse proxy)
|
||||
RAGFLOW_PORT_OVERRIDE=80
|
||||
|
||||
# MinIO web console port
|
||||
MINIO_CONSOLE_PORT_OVERRIDE=9001
|
||||
|
||||
# Secrets (CHANGEME: use strong random values in production)
|
||||
SECRET_KEY=changeme_secret_key_CHANGEME
|
||||
MYSQL_PASSWORD=ragflow
|
||||
REDIS_PASSWORD=redispassword
|
||||
MINIO_USER=minioadmin
|
||||
MINIO_PASSWORD=minioadmin
|
||||
|
||||
# Resource Limits - RAGFlow
|
||||
RAGFLOW_CPU_LIMIT=4
|
||||
RAGFLOW_MEMORY_LIMIT=4G
|
||||
RAGFLOW_CPU_RESERVATION=1
|
||||
RAGFLOW_MEMORY_RESERVATION=2G
|
||||
|
||||
# Resource Limits - Elasticsearch
|
||||
ELASTICSEARCH_CPU_LIMIT=2
|
||||
ELASTICSEARCH_MEMORY_LIMIT=2G
|
||||
ELASTICSEARCH_CPU_RESERVATION=0.5
|
||||
ELASTICSEARCH_MEMORY_RESERVATION=1G
|
||||
|
||||
# Resource Limits - MySQL
|
||||
MYSQL_CPU_LIMIT=1
|
||||
MYSQL_MEMORY_LIMIT=1G
|
||||
MYSQL_CPU_RESERVATION=0.25
|
||||
MYSQL_MEMORY_RESERVATION=256M
|
||||
|
||||
# Resource Limits - Redis
|
||||
REDIS_CPU_LIMIT=0.5
|
||||
REDIS_MEMORY_LIMIT=512M
|
||||
REDIS_CPU_RESERVATION=0.1
|
||||
REDIS_MEMORY_RESERVATION=128M
|
||||
|
||||
# Resource Limits - MinIO
|
||||
MINIO_CPU_LIMIT=1
|
||||
MINIO_MEMORY_LIMIT=1G
|
||||
MINIO_CPU_RESERVATION=0.25
|
||||
MINIO_MEMORY_RESERVATION=256M
|
||||
@@ -0,0 +1,84 @@
|
||||
# RAGFlow
|
||||
|
||||
[English](./README.md) | [中文](./README.zh.md)
|
||||
|
||||
Quick start: <https://ragflow.io/docs>.
|
||||
|
||||
This service deploys RAGFlow, an open-source Retrieval-Augmented Generation engine based on deep document understanding. It provides intelligent question answering over complex documents (PDFs, Word, PowerPoint, etc.) with accurate citation and citation tracing.
|
||||
|
||||
> **Platform note**: This stack is **x86-64 (amd64) only**. ARM64 is not supported by the official image.
|
||||
>
|
||||
> **Resource note**: Elasticsearch alone requires ~2 GB RAM. Provision at least **8 GB RAM** total before starting.
|
||||
|
||||
## Services
|
||||
|
||||
- **ragflow**: The RAGFlow web application and API server (Nginx on port 80, API on port 9380).
|
||||
- **es01**: Elasticsearch single-node cluster for vector and full-text search.
|
||||
- **mysql**: MySQL 8 database for metadata and workflow state.
|
||||
- **redis**: Redis for task queues and caching.
|
||||
- **minio**: S3-compatible object storage for document and chunk storage.
|
||||
|
||||
## Quick Start
|
||||
|
||||
1. Copy `.env.example` to `.env`:
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
```
|
||||
|
||||
2. Update the secrets in `.env`:
|
||||
|
||||
```
|
||||
SECRET_KEY, MYSQL_PASSWORD, REDIS_PASSWORD, MINIO_PASSWORD
|
||||
```
|
||||
|
||||
3. Start the services (initial startup may take 2–5 minutes):
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
4. Open `http://localhost` and register the first admin account.
|
||||
|
||||
## Core Environment Variables
|
||||
|
||||
| Variable | Description | Default |
|
||||
| ---------------------- | -------------------------------------------------------- | -------------------------------- |
|
||||
| `RAGFLOW_VERSION` | RAGFlow image version | `v0.24.0` |
|
||||
| `RAGFLOW_PORT_OVERRIDE`| Host port for the web UI | `80` |
|
||||
| `SECRET_KEY` | Application secret key — **CHANGEME** | placeholder |
|
||||
| `MYSQL_PASSWORD` | MySQL root password (also used by RAGFlow) | `ragflow` |
|
||||
| `REDIS_PASSWORD` | Redis authentication password | `redispassword` |
|
||||
| `MINIO_USER` | MinIO root user | `minioadmin` |
|
||||
| `MINIO_PASSWORD` | MinIO root password | `minioadmin` |
|
||||
| `MINIO_CONSOLE_PORT_OVERRIDE` | MinIO web console host port | `9001` |
|
||||
|
||||
## Volumes
|
||||
|
||||
- `ragflow_logs`: RAGFlow application logs.
|
||||
- `ragflow_es_data`: Elasticsearch index data.
|
||||
- `ragflow_mysql_data`: MySQL database files.
|
||||
- `ragflow_redis_data`: Redis persistence.
|
||||
- `ragflow_minio_data`: Object storage for documents and embeddings.
|
||||
|
||||
## Ports
|
||||
|
||||
- **80**: RAGFlow web UI and API (via Nginx)
|
||||
- **9001**: MinIO web console
|
||||
|
||||
## Resource Requirements
|
||||
|
||||
| Service | CPU Limit | Memory Limit |
|
||||
| ------------- | --------- | ------------ |
|
||||
| ragflow | 4 | 4 GB |
|
||||
| elasticsearch | 2 | 2 GB |
|
||||
| mysql | 1 | 1 GB |
|
||||
| redis | 0.5 | 512 MB |
|
||||
| minio | 1 | 1 GB |
|
||||
|
||||
Total recommended: **8+ GB RAM**, **4+ CPU cores**.
|
||||
|
||||
## Documentation
|
||||
|
||||
- [RAGFlow Docs](https://ragflow.io/docs)
|
||||
- [GitHub](https://github.com/infiniflow/ragflow)
|
||||
@@ -0,0 +1,84 @@
|
||||
# RAGFlow
|
||||
|
||||
[English](./README.md) | [中文](./README.zh.md)
|
||||
|
||||
快速开始:<https://ragflow.io/docs>。
|
||||
|
||||
此服务用于部署 RAGFlow,一个基于深度文档理解的开源检索增强生成引擎。它能对复杂文档(PDF、Word、PowerPoint 等)进行智能问答,并提供精准的引用和引文追踪。
|
||||
|
||||
> **平台说明**:此 Stack 仅支持 **x86-64(amd64)**,官方镜像不支持 ARM64。
|
||||
>
|
||||
> **资源说明**:仅 Elasticsearch 就需要约 2 GB RAM,启动前请确保系统至少有 **8 GB RAM**。
|
||||
|
||||
## 服务
|
||||
|
||||
- **ragflow**:RAGFlow Web 应用和 API 服务器(Nginx 监听 80 端口,API 监听 9380 端口)。
|
||||
- **es01**:单节点 Elasticsearch 集群,用于向量和全文检索。
|
||||
- **mysql**:MySQL 8 数据库,用于元数据和工作流状态存储。
|
||||
- **redis**:Redis,用于任务队列和缓存。
|
||||
- **minio**:S3 兼容对象存储,用于文档和分块存储。
|
||||
|
||||
## 快速开始
|
||||
|
||||
1. 将 `.env.example` 复制为 `.env`:
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
```
|
||||
|
||||
2. 更新 `.env` 中的密钥:
|
||||
|
||||
```
|
||||
SECRET_KEY、MYSQL_PASSWORD、REDIS_PASSWORD、MINIO_PASSWORD
|
||||
```
|
||||
|
||||
3. 启动服务(首次启动可能需要 2~5 分钟):
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
4. 打开 `http://localhost`,注册第一个管理员账号。
|
||||
|
||||
## 核心环境变量
|
||||
|
||||
| 变量 | 说明 | 默认值 |
|
||||
| ----------------------------- | ------------------------------------------ | ------------- |
|
||||
| `RAGFLOW_VERSION` | RAGFlow 镜像版本 | `v0.24.0` |
|
||||
| `RAGFLOW_PORT_OVERRIDE` | Web UI 宿主机端口 | `80` |
|
||||
| `SECRET_KEY` | 应用密钥——**请修改** | 占位符 |
|
||||
| `MYSQL_PASSWORD` | MySQL root 密码(也供 RAGFlow 使用) | `ragflow` |
|
||||
| `REDIS_PASSWORD` | Redis 认证密码 | `redispassword` |
|
||||
| `MINIO_USER` | MinIO root 用户名 | `minioadmin` |
|
||||
| `MINIO_PASSWORD` | MinIO root 密码 | `minioadmin` |
|
||||
| `MINIO_CONSOLE_PORT_OVERRIDE` | MinIO Web 控制台宿主机端口 | `9001` |
|
||||
|
||||
## 数据卷
|
||||
|
||||
- `ragflow_logs`:RAGFlow 应用日志。
|
||||
- `ragflow_es_data`:Elasticsearch 索引数据。
|
||||
- `ragflow_mysql_data`:MySQL 数据库文件。
|
||||
- `ragflow_redis_data`:Redis 持久化数据。
|
||||
- `ragflow_minio_data`:文档和嵌入向量的对象存储。
|
||||
|
||||
## 端口
|
||||
|
||||
- **80**:RAGFlow Web UI 和 API(通过 Nginx)
|
||||
- **9001**:MinIO Web 控制台
|
||||
|
||||
## 资源需求
|
||||
|
||||
| 服务 | CPU 限制 | 内存限制 |
|
||||
| ------------- | -------- | -------- |
|
||||
| ragflow | 4 | 4 GB |
|
||||
| elasticsearch | 2 | 2 GB |
|
||||
| mysql | 1 | 1 GB |
|
||||
| redis | 0.5 | 512 MB |
|
||||
| minio | 1 | 1 GB |
|
||||
|
||||
推荐总计:**8+ GB RAM**,**4+ CPU 核心**。
|
||||
|
||||
## 文档
|
||||
|
||||
- [RAGFlow 文档](https://ragflow.io/docs)
|
||||
- [GitHub](https://github.com/infiniflow/ragflow)
|
||||
@@ -0,0 +1,157 @@
|
||||
# RAGFlow requires substantial system resources.
|
||||
# Elasticsearch alone needs ~2 GB RAM. Total recommended: 8+ GB RAM.
|
||||
# This stack is x86-64 (amd64) only; ARM64 is not supported.
|
||||
|
||||
x-defaults: &defaults
|
||||
restart: unless-stopped
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: 100m
|
||||
max-file: '3'
|
||||
|
||||
services:
|
||||
ragflow:
|
||||
<<: *defaults
|
||||
image: ${GLOBAL_REGISTRY:-}infiniflow/ragflow:${RAGFLOW_VERSION:-v0.24.0}
|
||||
depends_on:
|
||||
mysql:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
minio:
|
||||
condition: service_healthy
|
||||
es01:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- '${RAGFLOW_PORT_OVERRIDE:-80}:80'
|
||||
volumes:
|
||||
- ragflow_logs:/ragflow/logs
|
||||
environment:
|
||||
- TZ=${TZ:-UTC}
|
||||
- MYSQL_PASSWORD=${MYSQL_PASSWORD:-ragflow}
|
||||
- MINIO_USER=${MINIO_USER:-minioadmin}
|
||||
- MINIO_PASSWORD=${MINIO_PASSWORD:-minioadmin}
|
||||
- REDIS_PASSWORD=${REDIS_PASSWORD:-redispassword}
|
||||
- SECRET_KEY=${SECRET_KEY:-changeme_secret_key_CHANGEME}
|
||||
healthcheck:
|
||||
test: [CMD-SHELL, "curl -sf http://localhost/ > /dev/null 2>&1 || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 15s
|
||||
retries: 10
|
||||
start_period: 120s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: ${RAGFLOW_CPU_LIMIT:-4}
|
||||
memory: ${RAGFLOW_MEMORY_LIMIT:-4G}
|
||||
reservations:
|
||||
cpus: ${RAGFLOW_CPU_RESERVATION:-1}
|
||||
memory: ${RAGFLOW_MEMORY_RESERVATION:-2G}
|
||||
|
||||
es01:
|
||||
<<: *defaults
|
||||
image: ${GLOBAL_REGISTRY:-}elasticsearch:${ELASTICSEARCH_VERSION:-8.11.3}
|
||||
environment:
|
||||
- TZ=${TZ:-UTC}
|
||||
- discovery.type=single-node
|
||||
- xpack.security.enabled=false
|
||||
- ES_JAVA_OPTS=-Xms512m -Xmx1g
|
||||
volumes:
|
||||
- ragflow_es_data:/usr/share/elasticsearch/data
|
||||
healthcheck:
|
||||
test: [CMD-SHELL, "curl -sf http://localhost:9200/_cluster/health | grep -qE '\"status\":\"(green|yellow)\"' || exit 1"]
|
||||
interval: 15s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 60s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: ${ELASTICSEARCH_CPU_LIMIT:-2}
|
||||
memory: ${ELASTICSEARCH_MEMORY_LIMIT:-2G}
|
||||
reservations:
|
||||
cpus: ${ELASTICSEARCH_CPU_RESERVATION:-0.5}
|
||||
memory: ${ELASTICSEARCH_MEMORY_RESERVATION:-1G}
|
||||
|
||||
mysql:
|
||||
<<: *defaults
|
||||
image: ${GLOBAL_REGISTRY:-}mysql:${MYSQL_VERSION:-8.0.39}
|
||||
environment:
|
||||
- TZ=${TZ:-UTC}
|
||||
- MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD:-ragflow}
|
||||
- MYSQL_DATABASE=rag_flow
|
||||
volumes:
|
||||
- ragflow_mysql_data:/var/lib/mysql
|
||||
healthcheck:
|
||||
test: [CMD, mysqladmin, ping, -h, localhost]
|
||||
interval: 10s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: ${MYSQL_CPU_LIMIT:-1}
|
||||
memory: ${MYSQL_MEMORY_LIMIT:-1G}
|
||||
reservations:
|
||||
cpus: ${MYSQL_CPU_RESERVATION:-0.25}
|
||||
memory: ${MYSQL_MEMORY_RESERVATION:-256M}
|
||||
|
||||
redis:
|
||||
<<: *defaults
|
||||
image: ${GLOBAL_REGISTRY:-}redis:${REDIS_VERSION:-7}
|
||||
command: >
|
||||
--requirepass ${REDIS_PASSWORD:-redispassword}
|
||||
--maxmemory-policy noeviction
|
||||
environment:
|
||||
- REDIS_PASSWORD=${REDIS_PASSWORD:-redispassword}
|
||||
volumes:
|
||||
- ragflow_redis_data:/data
|
||||
healthcheck:
|
||||
test: [CMD-SHELL, "redis-cli -a $$REDIS_PASSWORD ping | grep -q PONG"]
|
||||
interval: 5s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: ${REDIS_CPU_LIMIT:-0.5}
|
||||
memory: ${REDIS_MEMORY_LIMIT:-512M}
|
||||
reservations:
|
||||
cpus: ${REDIS_CPU_RESERVATION:-0.1}
|
||||
memory: ${REDIS_MEMORY_RESERVATION:-128M}
|
||||
|
||||
minio:
|
||||
<<: *defaults
|
||||
image: ${GLOBAL_REGISTRY:-}minio/minio:${MINIO_VERSION:-RELEASE.2025-01-20T14-49-07Z}
|
||||
command: server /data --console-address ':9001'
|
||||
environment:
|
||||
- TZ=${TZ:-UTC}
|
||||
- MINIO_ROOT_USER=${MINIO_USER:-minioadmin}
|
||||
- MINIO_ROOT_PASSWORD=${MINIO_PASSWORD:-minioadmin}
|
||||
volumes:
|
||||
- ragflow_minio_data:/data
|
||||
ports:
|
||||
- '${MINIO_CONSOLE_PORT_OVERRIDE:-9001}:9001'
|
||||
healthcheck:
|
||||
test: [CMD-SHELL, "curl -sf http://localhost:9000/minio/health/live || exit 1"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
start_period: 10s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: ${MINIO_CPU_LIMIT:-1}
|
||||
memory: ${MINIO_MEMORY_LIMIT:-1G}
|
||||
reservations:
|
||||
cpus: ${MINIO_CPU_RESERVATION:-0.25}
|
||||
memory: ${MINIO_MEMORY_RESERVATION:-256M}
|
||||
|
||||
volumes:
|
||||
ragflow_logs:
|
||||
ragflow_es_data:
|
||||
ragflow_mysql_data:
|
||||
ragflow_redis_data:
|
||||
ragflow_minio_data:
|
||||
Reference in New Issue
Block a user