diff --git a/Dockerfile b/Dockerfile index bdc8b84..4fb6fc1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,6 +31,7 @@ LABEL maintainer="wanikua" \ # 安装系统依赖(合并为单层减小体积) RUN apk add --no-cache \ + bash \ curl \ git \ ca-certificates \ @@ -79,12 +80,11 @@ RUN chmod +x /entrypoint.sh /init-docker.sh # 复制 GUI 构建产物 COPY --from=gui-builder /build/dist/ /opt/gui/dist/ -COPY --from=gui-builder /build/node_modules/ /opt/gui/server/node_modules/ COPY gui/server/ /opt/gui/server/ COPY gui/package.json /opt/gui/package.json # 安装 GUI 后端依赖 -RUN cd /opt/gui/server && npm ci --only=production --loglevel=error && \ +RUN cd /opt/gui/server && npm ci --omit=dev --loglevel=error && \ chown -R court:court /opt/gui # 复制 Skills(只读模板) diff --git a/configs/modern-ceo/openclaw.json b/configs/modern-ceo/openclaw.json index 152b05a..8b24dea 100644 --- a/configs/modern-ceo/openclaw.json +++ b/configs/modern-ceo/openclaw.json @@ -237,7 +237,7 @@ "enabled": true, "dmPolicy": "open", "groupPolicy": "open", - "allowBots": true, + "allowBots": "mentions", "accounts": { "board": { "name": "Board", @@ -334,7 +334,7 @@ "enabled": false, "dmPolicy": "open", "groupPolicy": "open", - "allowBots": true, + "allowBots": "mentions", "accounts": { "ceo": { "appId": "YOUR_CEO_APP_ID", diff --git a/configs/tang-sansheng/openclaw.json b/configs/tang-sansheng/openclaw.json index 72dbc55..6f8f3a6 100644 --- a/configs/tang-sansheng/openclaw.json +++ b/configs/tang-sansheng/openclaw.json @@ -291,7 +291,7 @@ "enabled": true, "dmPolicy": "open", "groupPolicy": "open", - "allowBots": false, + "allowBots": "mentions", "accounts": { "silijian": { "name": "司礼监", @@ -374,7 +374,7 @@ "enabled": false, "dmPolicy": "open", "groupPolicy": "open", - "allowBots": false, + "allowBots": "mentions", "accounts": { "silijian": { "appId": "YOUR_FEISHU_APP_ID", diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index f16a5fd..c8cce3e 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -189,6 +189,8 @@ if command -v openclaw &>/dev/null && [ -f "$CONFIG_DIR/openclaw.json" ]; then fi fi -"$@" & -GATEWAY_PID=$! -wait $GATEWAY_PID +if [ $# -gt 0 ]; then + "$@" & + GATEWAY_PID=$! + wait $GATEWAY_PID || true +fi diff --git a/install-lite.sh b/install-lite.sh index f9776fe..62fef04 100755 --- a/install-lite.sh +++ b/install-lite.sh @@ -87,7 +87,7 @@ echo "" echo -e "${YELLOW}[1/5] 初始化朝廷工作区...${NC}" # 确保 HOME 变量有效(修复 Windows Git Bash 和非交互式 shell 环境) -if [ -z "$HOME" ]; then +if [ -z "${HOME:-}" ]; then HOME=$(getent passwd "$(id -un)" | cut -d: -f6) [ -z "$HOME" ] && HOME="/root" export HOME diff --git a/install-mac.sh b/install-mac.sh index 4318ca8..aeb2bae 100755 --- a/install-mac.sh +++ b/install-mac.sh @@ -97,7 +97,7 @@ if command -v openclaw &>/dev/null; then echo -e " ${GREEN}✓ OpenClaw $(openclaw --version 2>/dev/null) 已安装${NC}" else echo -e " ${CYAN}→ 安装 OpenClaw...${NC}" - npm install -g openclaw 2>/dev/null + npm install -g openclaw 2>/dev/null || true if command -v openclaw &>/dev/null; then CLI_CMD="openclaw" CONFIG_DIR="$HOME/.openclaw" diff --git a/install.ps1 b/install.ps1 index 4688b32..f250333 100644 --- a/install.ps1 +++ b/install.ps1 @@ -278,13 +278,13 @@ Get-Content $env:APPDATA\..\Local\openclaw\logs\gateway.log -Tail 50 **方式 A:使用 WSL2(推荐)** \`\`\`powershell -wsl bash -c "$(curl -fsSL https://raw.githubusercontent.com/wanikua/danghuangshang/main/install-lite.sh)" +wsl bash -c "`$(curl -fsSL https://raw.githubusercontent.com/wanikua/danghuangshang/main/install-lite.sh)" \`\`\` **方式 B:使用 Git Bash** 安装 Git for Windows 后,在 Git Bash 中运行: \`\`\`bash -bash -c "$(curl -fsSL https://raw.githubusercontent.com/wanikua/danghuangshang/main/install-lite.sh)" +bash -c "`$(curl -fsSL https://raw.githubusercontent.com/wanikua/danghuangshang/main/install-lite.sh)" \`\`\` > 详细说明见 [docs/windows-wsl.md](https://github.com/wanikua/danghuangshang/blob/main/docs/windows-wsl.md)