RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
Dev: launch_backend_service.sh to support --debug (#19215)
Wang Qi4ab91c703ca5
diff --git a/docker/launch_backend_service.sh b/docker/launch_backend_service.shindex 10f7811349..8bd643155c 100755--- a/docker/launch_backend_service.sh+++ b/docker/launch_backend_service.sh@@ -5,9 +5,12 @@ set -eusage() {local exit_code=${1:-1}- echo "Usage: $0 [ragflow|task_executor|admin|data_sync]..."+ echo "Usage: $0 [OPTIONS] [ragflow|task_executor|admin|data_sync]..."echoecho "Without arguments, starts ragflow and task_executor."+ echo "Options:"+ echo " --debug Enable debug mode and debug-level logging"+ echoecho "Available service types:"echo " ragflow Start RAGFlow server based on API_PROXY_SCHEME"echo " task_executor Start task workers based on API_PROXY_SCHEME"@@ -16,6 +19,7 @@ usage() {echoecho "Examples:"echo " $0"+ echo " $0 --debug"echo " $0 ragflow"echo " $0 task_executor"echo " $0 admin"@@ -99,10 +103,13 @@ task_exe(){prepare_for_gotask_name="ragflow_server --ingestor"task_cmd=("bin/ragflow_server" "--ingestor")+ if [[ "$DEBUG_MODE" -eq 1 ]]; then+ task_cmd+=("--debug")+ fifilocal retry_count=0while ! $STOP && [ $retry_count -lt $MAX_RETRIES ]; do- echo "Starting $task_name (Attempt $((retry_count+1)))"+ echo "Starting ${task_cmd[*]} (Attempt $((retry_count+1)))"EXIT_CODE=0if [[ "${API_PROXY_SCHEME}" == "go" ]]; then"${task_cmd[@]}" || EXIT_CODE=$?@@ -134,9 +141,12 @@ run_server(){server_name="ragflow_server"server_cmd=("bin/ragflow_server" "--api")fi+ if [[ "$DEBUG_MODE" -eq 1 ]]; then+ server_cmd+=("--debug")+ filocal retry_count=0while ! $STOP && [ $retry_count -lt $MAX_RETRIES ]; do- echo "Starting $server_name (Attempt $((retry_count+1)))"+ echo "Starting ${server_cmd[*]} (Attempt $((retry_count+1)))"EXIT_CODE=0"${server_cmd[@]}" || EXIT_CODE=$?if [ $EXIT_CODE -eq 0 ]; then@@ -163,10 +173,13 @@ run_admin_server(){prepare_for_goserver_name="admin_server"server_cmd=("bin/ragflow_server" "--admin")+ if [[ "$DEBUG_MODE" -eq 1 ]]; then+ server_cmd+=("--debug")+ fifilocal retry_count=0while ! $STOP && [ $retry_count -lt $MAX_RETRIES ]; do- echo "Starting $server_name (Attempt $((retry_count+1)))"+ echo "Starting ${server_cmd[*]} (Attempt $((retry_count+1)))"EXIT_CODE=0"${server_cmd[@]}" || EXIT_CODE=$?if [ $EXIT_CODE -eq 0 ]; then@@ -245,31 +258,36 @@ START_RAGFLOW=0START_TASK_EXECUTOR=0START_ADMIN=0START_DATA_SYNC=0--if [ $# -eq 0 ]; then- START_RAGFLOW=1- START_TASK_EXECUTOR=1-fi+DEBUG_MODE=0+SERVICE_SELECTED=0for arg in "$@"; docase $arg inragflow|server|webserver)START_RAGFLOW=1+ SERVICE_SELECTED=1;;task_executor|task-executor|taskexecutor|ingestor)START_TASK_EXECUTOR=1+ SERVICE_SELECTED=1;;admin|admin_server|admin-server)START_ADMIN=1+ SERVICE_SELECTED=1;;data_sync|data-sync|datasync)START_DATA_SYNC=1+ SERVICE_SELECTED=1;;all)START_RAGFLOW=1START_TASK_EXECUTOR=1START_ADMIN=1START_DATA_SYNC=1+ SERVICE_SELECTED=1+ ;;+ --debug)+ DEBUG_MODE=1;;-h|--help)usage 0@@ -281,6 +299,15 @@ for arg in "$@"; doesacdone+if [[ "$DEBUG_MODE" -eq 1 && "${API_PROXY_SCHEME}" != "go" ]]; then+ export LOG_LEVELS="root=DEBUG"+fi++if [[ "$SERVICE_SELECTED" -eq 0 ]]; then+ START_RAGFLOW=1+ START_TASK_EXECUTOR=1+fi+if [[ "$START_RAGFLOW" -eq 1 ]]; thenensure_db_initrun_mysql_migrations