Principle:Infiniflow Ragflow Server Startup
| Knowledge Sources | |
|---|---|
| Domains | DevOps, Backend_Architecture |
| Last Updated | 2026-02-12 06:00 GMT |
Overview
A multi-process startup orchestration pattern that initializes configuration, database, web server, task workers, and auxiliary services.
Description
Server Startup orchestrates the initialization of the RAGFlow application through the entrypoint script and Flask server. The sequence: (1) envsubst generates service_conf.yaml, (2) nginx starts for reverse proxy, (3) ragflow_server.py initializes Flask, database, and settings, (4) sync_data_source.py for background sync, (5) optionally admin_server.py, (6) task_executor.py workers with jemalloc, (7) optionally MCP server.
Usage
Automatic via Docker container entrypoint. For local development, use launch_backend_service.sh.
Theoretical Basis
The startup follows dependency-ordered initialization:
- Configuration first: YAML template rendered before any service starts
- Database before application: MySQL health check gates ragflow_server startup
- Workers after server: Task executors start after the main server initializes settings