refactor: 项目更名 WeKnora → Academy
Build & Publish (dsh-academy) / End-to-end inside dsh (latest, advisory) (push) Skipped
CLI / test (macos-latest / go 1.26) (push) Canceled after 0s
CLI / test (ubuntu-latest / go 1.26) (push) Canceled after 0s
CLI / test (windows-latest / go 1.26) (push) Canceled after 0s
Build and Push Docker Image / build-ui (push) Canceled after 0s
Build and Push Docker Image / build-docreader (push) Canceled after 0s
Build and Push Docker Image / build-sandbox (push) Canceled after 0s
Build and Push Docker Image / build-app (amd64, linux/amd64, ubuntu-latest) (push) Canceled after 0s
Build and Push Docker Image / build-app (arm64, linux/arm64, ubuntu-24.04-arm) (push) Canceled after 0s
Build and Push Docker Image / merge (push) Canceled after 0s
Frontend / Test, type-check, and build (push) Canceled after 0s
Frontend / Docker multi-stage image (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.10) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.11) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.12) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.13) (push) Canceled after 0s
Build & Publish (mcp-server) / Build sdist + wheel (push) Canceled after 0s
Build & Publish (mcp-server) / Publish to PyPI (push) Canceled after 0s
Anydoc / anydoc parser engine (push) Canceled after 0s
App / Format, vet, test, and build (push) Canceled after 0s
DocReader / Python tests and Go client tests (push) Canceled after 0s
Build & Publish (dsh-academy) / Typecheck, test, pack (push) Canceled after 0s
Build & Publish (dsh-academy) / End-to-end inside dsh (pinned) (push) Canceled after 0s
Build & Publish (dsh-academy) / Publish to npm (push) Canceled after 0s
Go Lint Cache / warm lint cache (.) (push) Canceled after 0s
Go Lint Cache / warm lint cache (cli) (push) Canceled after 0s
Go Lint Cache / warm lint cache (client) (push) Canceled after 0s
Helm / chart (push) Canceled after 0s
Build & Publish (dsh-academy) / End-to-end inside dsh (latest, advisory) (push) Skipped
CLI / test (macos-latest / go 1.26) (push) Canceled after 0s
CLI / test (ubuntu-latest / go 1.26) (push) Canceled after 0s
CLI / test (windows-latest / go 1.26) (push) Canceled after 0s
Build and Push Docker Image / build-ui (push) Canceled after 0s
Build and Push Docker Image / build-docreader (push) Canceled after 0s
Build and Push Docker Image / build-sandbox (push) Canceled after 0s
Build and Push Docker Image / build-app (amd64, linux/amd64, ubuntu-latest) (push) Canceled after 0s
Build and Push Docker Image / build-app (arm64, linux/arm64, ubuntu-24.04-arm) (push) Canceled after 0s
Build and Push Docker Image / merge (push) Canceled after 0s
Frontend / Test, type-check, and build (push) Canceled after 0s
Frontend / Docker multi-stage image (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.10) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.11) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.12) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.13) (push) Canceled after 0s
Build & Publish (mcp-server) / Build sdist + wheel (push) Canceled after 0s
Build & Publish (mcp-server) / Publish to PyPI (push) Canceled after 0s
Anydoc / anydoc parser engine (push) Canceled after 0s
App / Format, vet, test, and build (push) Canceled after 0s
DocReader / Python tests and Go client tests (push) Canceled after 0s
Build & Publish (dsh-academy) / Typecheck, test, pack (push) Canceled after 0s
Build & Publish (dsh-academy) / End-to-end inside dsh (pinned) (push) Canceled after 0s
Build & Publish (dsh-academy) / Publish to npm (push) Canceled after 0s
Go Lint Cache / warm lint cache (.) (push) Canceled after 0s
Go Lint Cache / warm lint cache (cli) (push) Canceled after 0s
Go Lint Cache / warm lint cache (client) (push) Canceled after 0s
Helm / chart (push) Canceled after 0s
- 全量替换代码/配置/文档中的项目名(保留上游 GitHub 链接、weixin 文档域名、Docker Hub 镜像名) - 重命名 32 个含项目名的文件/目录;Go module 路径改为 academy(含 client/cli 子模块) - docreader proto 描述符采用等长替换,保持序列化字节布局有效 - Dockerfile.app 构建网络修复: browserskill 离线产物通道、PyPI/apt 国内镜像 - 运行验证: go build ✓ docker compose up ✓ 健康检查 ✓
This commit is contained in:
1 parent
9097ee699d
commit
9058149576
3136 files changed
+18018
-18004
No files matched your search
+25
-13
@@ -19,9 +19,11 @@ ENV RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo
|
||||
ENV PATH=/usr/local/cargo/bin:$PATH
|
||||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable
|
||||
COPY scripts/build_browserskill.sh scripts/browserskill-release.json ./scripts/
|
||||
# 离线快速通道:优先使用仓库内预构建产物(air-gapped/网络受限环境无需 clone GitHub)
|
||||
COPY artifacts/browserskill ./artifacts/browserskill/
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
RUN bash scripts/build_browserskill.sh /opt/weknora/browserskill "${TARGETOS}/${TARGETARCH}"
|
||||
RUN bash scripts/build_browserskill.sh /opt/academy/browserskill "${TARGETOS}/${TARGETARCH}"
|
||||
|
||||
# Build stage
|
||||
FROM golang:1.26-bookworm AS builder
|
||||
@@ -132,18 +134,30 @@ FROM debian:12.12-slim
|
||||
WORKDIR /app
|
||||
|
||||
ARG APK_MIRROR_ARG
|
||||
# PyPI 镜像(国内网络直连 pypi.org 常超时;由 compose 传入国内源,留空回退官方源)
|
||||
ARG PIP_INDEX_ARG
|
||||
# apt bootstrap 镜像(须为不跳转 HTTPS 的纯 HTTP 源,如 mirrors.aliyun.com)
|
||||
ARG BOOTSTRAP_MIRROR_ARG
|
||||
|
||||
# Pairing derives the gateway URL from the user's page origin by default.
|
||||
ENV BROWSERSKILL_BINARY=/opt/weknora/browserskill/bsk \
|
||||
BROWSERSKILL_EXTENSION_PATH=/opt/weknora/browserskill/browser-skill-weknora-0.3.1.zip
|
||||
COPY --from=browserskill /opt/weknora/browserskill /opt/weknora/browserskill
|
||||
ENV BROWSERSKILL_BINARY=/opt/academy/browserskill/bsk \
|
||||
BROWSERSKILL_EXTENSION_PATH=/opt/academy/browserskill/browser-skill-academy-0.3.1.zip
|
||||
COPY --from=browserskill /opt/academy/browserskill /opt/academy/browserskill
|
||||
|
||||
# Create a non-root user first
|
||||
RUN useradd -m -s /bin/bash appuser
|
||||
|
||||
# First, install ca-certificates without mirror to ensure HTTPS works
|
||||
RUN apt-get update && \
|
||||
# First, install ca-certificates via an HTTP-only bootstrap mirror (国内直连官方源
|
||||
# 速率极慢;主镜像会 302 跳 HTTPS 而此刻尚无信任库,故 bootstrap 需用不跳转的 HTTP 源),
|
||||
# 装好信任库后立即把源切到 APK_MIRROR_ARG 供后续步骤使用
|
||||
RUN if [ -n "$BOOTSTRAP_MIRROR_ARG" ]; then \
|
||||
sed -i "s@deb.debian.org@${BOOTSTRAP_MIRROR_ARG}@g" /etc/apt/sources.list.d/debian.sources; \
|
||||
fi && \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends ca-certificates && \
|
||||
if [ -n "$APK_MIRROR_ARG" ]; then \
|
||||
sed -i "s@${BOOTSTRAP_MIRROR_ARG:-deb.debian.org}@${APK_MIRROR_ARG}@g" /etc/apt/sources.list.d/debian.sources; \
|
||||
fi && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Then switch to mirror if specified and install other packages
|
||||
@@ -158,12 +172,10 @@ RUN if [ -n "$APK_MIRROR_ARG" ]; then \
|
||||
nodejs npm \
|
||||
gosu \
|
||||
ffmpeg && \
|
||||
python3 -m pip install --break-system-packages --upgrade pip setuptools wheel && \
|
||||
mkdir -p /home/appuser/.local/bin && \
|
||||
curl -LsSf https://astral.sh/uv/install.sh | CARGO_HOME=/home/appuser/.cargo UV_INSTALL_DIR=/home/appuser/.local/bin sh && \
|
||||
python3 -m pip install --break-system-packages -i ${PIP_INDEX_ARG:-https://pypi.org/simple} --upgrade pip setuptools wheel && \
|
||||
# uv 通过 PyPI 镜像安装(uvx 由 pip 装入 /usr/local/bin;官方 astral.sh 安装脚本在受限网络不可达)
|
||||
python3 -m pip install --break-system-packages -i ${PIP_INDEX_ARG:-https://pypi.org/simple} uv && \
|
||||
chown -R appuser:appuser /home/appuser && \
|
||||
ln -sf /home/appuser/.local/bin/uvx /usr/local/bin/uvx && \
|
||||
chmod +x /usr/local/bin/uvx && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -181,7 +193,7 @@ COPY --from=builder /app/scripts ./scripts
|
||||
COPY --from=builder /app/migrations ./migrations
|
||||
COPY --from=builder /app/dataset/samples ./dataset/samples
|
||||
COPY --from=builder /root/.duckdb /home/appuser/.duckdb
|
||||
COPY --from=builder /app/WeKnora .
|
||||
COPY --from=builder /app/Academy .
|
||||
COPY --from=builder /license-bundle/ ./
|
||||
|
||||
# Copy and make entrypoint script executable
|
||||
@@ -195,4 +207,4 @@ EXPOSE 8080
|
||||
|
||||
|
||||
ENTRYPOINT ["./scripts/docker-entrypoint.sh"]
|
||||
CMD ["./WeKnora"]
|
||||
CMD ["./Academy"]
|
||||
Reference in new issue
Block a user