Spaces:
Running
Running
| # Dockerfile -- HF Space deployment (v10: .dockerignore + optimized sleep) | |
| # rebuild-20260616-v18 | |
| FROM node:22-slim | |
| # 1. System deps + Python deps + OpenViking server (merged RUN) | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| python3 python3-pip ca-certificates curl openssl tzdata \ | |
| && rm -rf /var/lib/apt/lists/* \ | |
| && pip3 install --no-cache-dir --break-system-packages \ | |
| requests huggingface_hub bcrypt \ | |
| "openviking[bot]" --upgrade --force-reinstall | |
| # 1c. Install Caddy (lightweight reverse proxy) — download at build time to avoid LFS issues | |
| RUN curl -fsSL "https://github.com/caddyserver/caddy/releases/download/v2.7.6/caddy_2.7.6_linux_amd64.tar.gz" -o /tmp/caddy.tar.gz \ | |
| && tar -xzf /tmp/caddy.tar.gz -C /usr/bin caddy \ | |
| && chmod +x /usr/bin/caddy \ | |
| && rm /tmp/caddy.tar.gz | |
| # 2a. Install OpenClaw CLI + pre-download WeChat plugin + cache bust (merged RUN) | |
| ENV OPENCLAW_STATE_DIR=/root/.openclaw | |
| RUN npm install -g openclaw@latest --unsafe-perm --no-audit --no-fund \ | |
| && mkdir -p /root/.openclaw \ | |
| && openclaw plugins install "@tencent-weixin/openclaw-weixin" --no-audit --no-fund 2>/dev/null || true \ | |
| && openclaw plugins install clawhub:@openviking/openclaw-plugin --no-audit --no-fund 2>/dev/null || true \ | |
| && echo "bust-20260616-v19" | |
| # 3. Copy app files | |
| WORKDIR /app | |
| COPY backup-manager.py config-generator.py start-openclaw.sh control-server.py control.html ./ | |
| COPY scripts/feishu-setup.sh scripts/install-programs.sh scripts/wechat-activate.sh ./scripts/ | |
| RUN chmod +x start-openclaw.sh scripts/*.sh | |
| # 4. Environment | |
| ENV PORT=7860 \ | |
| HOME=/root \ | |
| TZ=Asia/Shanghai \ | |
| NODE_OPTIONS=--max-old-space-size=4096 \ | |
| NPM_CONFIG_REGISTRY=https://registry.npmmirror.com \ | |
| NODE_ENV=production \ | |
| PYTHONUNBUFFERED=1 | |
| EXPOSE 7860 | |
| CMD ["./start-openclaw.sh"] |