Files
edict/Dockerfile
cft0808 0f1c24bd44 fix: 修复多个bug并合并社区贡献
Bug 修复:
- Fix #232: court_discuss.py 添加 from __future__ import annotations 兼容 Python 3.9
- Fix #233: Dockerfile 添加 channels 模块 COPY 解决 Docker 运行时 ModuleNotFoundError
- Fix #234: sync_agent_config.py 将 dispatchChannel 默认值从 'feishu' 改为空字符串
- Fix #241: sync_agent_config.py 收集 defaults.models 中的所有可用模型到看板选择器

社区贡献 (cherry-pick):
- PR #239 (@ElninoZhong): 添加 workflow state vs execution ownership 文档
- PR #237 (@ElninoZhong): 修复 feishu 默认值问题
- PR #212 (@YIOYIOIOI): Windows install.ps1 优先 python 命令 + UTF-8 编码修复

依赖更新 (Dependabot):
- actions/checkout v4 → v6
- docker/setup-buildx-action v3 → v4
- docker/build-push-action v5 → v7
- actions/labeler v5 → v6
- actions/stale v9 → v10
2026-03-30 21:48:55 +08:00

48 lines
1.6 KiB
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ⚔️ 三省六部 · Demo Dashboard
# docker run -p 7891:7891 cft0808/sansheng-demo
# Then open: http://localhost:7891
# Stage 1: 构建 React 前端
FROM --platform=${BUILDPLATFORM:-linux/amd64} node:20-alpine AS frontend-build
WORKDIR /build
COPY edict/frontend/package.json edict/frontend/package-lock.json ./
RUN npm ci --silent
COPY edict/frontend/ ./
# Build 输出到 /build/distvite.config 中 outDir 是相对路径,这里重写)
RUN npx vite build --outDir /build/dist
# Stage 2: 运行时 (多架构支持 amd64 + arm64)
FROM python:3.11-slim
WORKDIR /app
# 复制看板核心文件
COPY dashboard/ ./dashboard/
COPY scripts/ ./scripts/
# 复制通知渠道模块 (Fix #233: server.py 依赖 channels 包)
COPY edict/backend/app/channels/ ./edict/backend/app/channels/
# 复制 React 构建产物
COPY --from=frontend-build /build/dist ./dashboard/dist/
# 注入演示数据data目录由demo_data提供
COPY docker/demo_data/ ./data/
# 创建 .openclaw 目录并注入骨架配置Fix #155: sync_agent_config 依赖此文件)
RUN mkdir -p /app/.openclaw
COPY docker/demo_data/openclaw.json /app/.openclaw/openclaw.json
ENV HOME=/app
# 非 root 用户运行
RUN groupadd -r appuser && useradd -r -g appuser -d /app appuser \
&& chown -R appuser:appuser /app
USER appuser
EXPOSE 7891
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
CMD python3 -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:7891/healthz')" || exit 1
CMD ["python3", "dashboard/server.py", "--host", "0.0.0.0", "--port", "7891"]