Fix docker building (#13681)

### What problem does this PR solve?

1. Refactor go server log
2. Update docker building, since nginx config should be set according to
the deployment.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-03-19 10:25:35 +08:00
committed by GitHub
parent c3f79dbcb0
commit 7ebe1d2722
9 changed files with 143 additions and 13 deletions

View File

@ -175,6 +175,27 @@ done < "${TEMPLATE_FILE}"
export LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu/"
PY=python3
# -----------------------------------------------------------------------------
# Select Nginx Configuration based on API_PROXY_SCHEME
# -----------------------------------------------------------------------------
NGINX_CONF_DIR="/etc/nginx/conf.d"
if [ -n "$API_PROXY_SCHEME" ]; then
if [[ "${API_PROXY_SCHEME}" == "hybrid" ]]; then
mv -f "$NGINX_CONF_DIR/ragflow.conf.hybrid" "$NGINX_CONF_DIR/ragflow.conf"
echo "Applied nginx config: ragflow.conf.hybrid"
elif [[ "${API_PROXY_SCHEME}" == "go" ]]; then
mv -f "$NGINX_CONF_DIR/ragflow.conf.golang" "$NGINX_CONF_DIR/ragflow.conf"
echo "Applied nginx config: ragflow.conf.golang (default)"
else
mv -f "$NGINX_CONF_DIR/ragflow.conf.python" "$NGINX_CONF_DIR/ragflow.conf"
echo "Applied nginx config: ragflow.conf.python"
fi
else
# Default to python backend
mv -f "$NGINX_CONF_DIR/ragflow.conf.python" "$NGINX_CONF_DIR/ragflow.conf"
echo "Default: applied nginx config: ragflow.conf.python"
fi
# -----------------------------------------------------------------------------
# Function(s)
# -----------------------------------------------------------------------------