Add RAGFlow service configuration and documentation

- Updated .env.example to include RAGFlow hostname and internal credentials for MySQL and MinIO.
- Modified Caddyfile to set up a reverse proxy for RAGFlow service.
- Enhanced docker-compose.yml with RAGFlow service definition, including environment variables and health checks for dependencies.
- Updated README.md to include RAGFlow information and service URL for user guidance.
- Configured system preparation script to set vm.max_map_count for Elasticsearch support required by RAGFlow.
- Added secret generation for RAGFlow internal credentials in the secrets generation script.
- Included RAGFlow in the final report script for visibility on service status and access information.
This commit is contained in:
Yury Kossakovsky
2025-10-29 11:37:37 -06:00
parent 1e2636d3bf
commit bf5575a48f
8 changed files with 142 additions and 0 deletions

View File

@@ -157,6 +157,7 @@ POSTIZ_HOSTNAME=postiz.yourdomain.com
PROMETHEUS_HOSTNAME=prometheus.yourdomain.com
QDRANT_HOSTNAME=qdrant.yourdomain.com
RAGAPP_HOSTNAME=ragapp.yourdomain.com
RAGFLOW_HOSTNAME=ragflow.yourdomain.com
SEARXNG_HOSTNAME=searxng.yourdomain.com
SUPABASE_HOSTNAME=supabase.yourdomain.com
WEAVIATE_HOSTNAME=weaviate.yourdomain.com
@@ -465,3 +466,10 @@ WAHA_DASHBOARD_PASSWORD=
# Swagger credentials
WHATSAPP_SWAGGER_USERNAME=
WHATSAPP_SWAGGER_PASSWORD=
############
# [required]
# RAGFlow internal credentials (for MySQL and MinIO)
############
RAGFLOW_MYSQL_ROOT_PASSWORD=
RAGFLOW_MINIO_ROOT_PASSWORD=

View File

@@ -33,6 +33,11 @@
reverse_proxy ragapp:8000
}
# RAGFlow
{$RAGFLOW_HOSTNAME} {
reverse_proxy ragflow:80
}
# Langfuse
{$LANGFUSE_HOSTNAME} {
reverse_proxy langfuse-web:3000

View File

@@ -64,6 +64,8 @@ The installer also makes the following powerful open-source tools **available fo
✅ [**RAGApp**](https://github.com/ragapp/ragapp) - Open-source application to build Retrieval-Augmented Generation (RAG) assistants over your data. Provides a web UI for chat and an HTTP API for integration with your workflows.
✅ [**RAGFlow**](https://ragflow.io/) - An open-source RAG engine based on deep document understanding, providing truthful question-answering capabilities with well-founded citations from complex formatted data.
✅ [**SearXNG**](https://searxng.org/) - A free, open-source internet metasearch engine. It aggregates results from numerous search services without tracking or profiling you, ensuring your privacy.
✅ [**Supabase**](https://supabase.com/) - An open-source alternative to Firebase, providing database storage, user authentication, and more. It's a popular choice for AI applications.
@@ -152,6 +154,7 @@ After successful installation, your services are up and running! Here's how to g
- **Prometheus:** `prometheus.yourdomain.com` (Typically used as a data source for Grafana)
- **Qdrant:** `qdrant.yourdomain.com`
- **RAGApp:** `ragapp.yourdomain.com`
- **RAGFlow:** `ragflow.yourdomain.com`
- **SearXNG:** `searxng.yourdomain.com`
- **Supabase (Dashboard):** `supabase.yourdomain.com`
- **WAHA:** `waha.yourdomain.com` (WhatsApp HTTP API; engines: WEBJS, NOWEB, GOWS)

View File

@@ -23,6 +23,9 @@ volumes:
postiz-uploads:
prometheus_data:
qdrant_storage:
ragflow_es_data:
ragflow_minio_data:
ragflow_mysql_data:
valkey-data:
weaviate_data:
@@ -245,6 +248,7 @@ services:
- PROMETHEUS_USERNAME=${PROMETHEUS_USERNAME}
- QDRANT_HOSTNAME=${QDRANT_HOSTNAME}
- RAGAPP_HOSTNAME=${RAGAPP_HOSTNAME}
- RAGFLOW_HOSTNAME=${RAGFLOW_HOSTNAME}
- RAGAPP_PASSWORD_HASH=${RAGAPP_PASSWORD_HASH}
- RAGAPP_USERNAME=${RAGAPP_USERNAME}
- SEARXNG_HOSTNAME=${SEARXNG_HOSTNAME}
@@ -806,3 +810,100 @@ services:
condition: service_healthy
postgres:
condition: service_healthy
ragflow:
image: infiniflow/ragflow:v0.21.1-slim
container_name: ragflow
profiles: ["ragflow"]
restart: unless-stopped
environment:
- SVR_HTTP_PORT=80
- REDIS_HOST=redis
- REDIS_PORT=6379
- MYSQL_HOST=ragflow-mysql
- MYSQL_PORT=3306
- MYSQL_USER=root
- MYSQL_PASSWORD=${RAGFLOW_MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=ragflow
- ES_HOST=ragflow-es
- ES_PORT=9200
- MINIO_HOST=ragflow-minio
- MINIO_PORT=9000
- MINIO_ACCESS_KEY=minio
- MINIO_SECRET_KEY=${RAGFLOW_MINIO_ROOT_PASSWORD}
- MINIO_BUCKET=ragflow
depends_on:
ragflow-mysql:
condition: service_healthy
ragflow-es:
condition: service_healthy
ragflow-minio:
condition: service_healthy
redis:
condition: service_healthy
ragflow-mysql:
image: mysql:8
container_name: ragflow-mysql
profiles: ["ragflow"]
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=${RAGFLOW_MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=ragflow
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h localhost || exit 1"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
volumes:
- ragflow_mysql_data:/var/lib/mysql
ragflow-es:
image: docker.elastic.co/elasticsearch/elasticsearch:8.15.3
container_name: ragflow-es
profiles: ["ragflow"]
restart: unless-stopped
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- ES_JAVA_OPTS=-Xms1g -Xmx1g
- bootstrap.memory_lock=true
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
healthcheck:
test:
[
"CMD-SHELL",
"wget -qO- http://localhost:9200 >/dev/null 2>&1 || exit 1",
]
interval: 10s
timeout: 5s
retries: 10
start_period: 60s
volumes:
- ragflow_es_data:/usr/share/elasticsearch/data
ragflow-minio:
image: minio/minio
container_name: ragflow-minio
profiles: ["ragflow"]
restart: unless-stopped
entrypoint: sh
command: -c 'mkdir -p /data/ragflow && minio server --address ":9000" --console-address ":9001" /data'
environment:
- MINIO_ROOT_USER=minio
- MINIO_ROOT_PASSWORD=${RAGFLOW_MINIO_ROOT_PASSWORD}
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
volumes:
- ragflow_minio_data:/data

View File

@@ -46,4 +46,15 @@ apt install -y unattended-upgrades
# Automatic confirmation for dpkg-reconfigure
echo "y" | dpkg-reconfigure --priority=low unattended-upgrades
# Set vm.max_map_count for Elasticsearch (required for RAGFlow if using ES backend)
log_info "Configuring vm.max_map_count for Elasticsearch support..."
if [ -f /etc/sysctl.conf ]; then
if ! grep -q "^vm.max_map_count" /etc/sysctl.conf; then
echo "vm.max_map_count=262144" >> /etc/sysctl.conf
log_info "Added vm.max_map_count=262144 to /etc/sysctl.conf"
fi
fi
# Apply immediately
sysctl -w vm.max_map_count=262144 > /dev/null 2>&1 || true
exit 0

View File

@@ -58,6 +58,9 @@ declare -A VARS_TO_GENERATE=(
# WAHA (WhatsApp HTTP API)
["WAHA_DASHBOARD_PASSWORD"]="password:32"
["WHATSAPP_SWAGGER_PASSWORD"]="password:32"
# RAGFlow internal credentials
["RAGFLOW_MYSQL_ROOT_PASSWORD"]="password:32"
["RAGFLOW_MINIO_ROOT_PASSWORD"]="password:32"
)
# Initialize existing_env_vars and attempt to read .env if it exists

View File

@@ -71,6 +71,7 @@ base_services_data=(
"python-runner" "Python Runner (Run your custom Python code from ./python-runner)"
"qdrant" "Qdrant (Vector Database)"
"ragapp" "RAGApp (Open-source RAG UI + API)"
"ragflow" "RAGFlow (Deep document understanding RAG engine)"
"searxng" "SearXNG (Private Metasearch Engine)"
"supabase" "Supabase (Backend as a Service)"
"waha" "WAHA WhatsApp HTTP API (NOWEB engine)"

View File

@@ -172,6 +172,16 @@ if is_profile_active "ragapp"; then
echo "API Docs: https://${RAGAPP_HOSTNAME:-<hostname_not_set>}/docs"
fi
if is_profile_active "ragflow"; then
echo
echo "================================= RAGFlow ============================="
echo
echo "Host: ${RAGFLOW_HOSTNAME:-<hostname_not_set>}"
echo "API (external via Caddy): https://${RAGFLOW_HOSTNAME:-<hostname_not_set>}"
echo "API (internal): http://ragflow:80"
echo "Note: Uses built-in authentication (login/registration available in web UI)"
fi
if is_profile_active "comfyui"; then
echo
echo "================================= ComfyUI ============================="