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 ✓ 健康检查 ✓
49 lines
2.3 KiB
Docker
49 lines
2.3 KiB
Docker
# Build from the repository root with:
|
|
# docker build --platform=linux/amd64 \
|
|
# --build-arg WEBSITE_NGINX_PORT=8080 \
|
|
# -t academy-site website-docs
|
|
# No host Node.js installation or prebuilt static-site/ is required.
|
|
# WEBSITE_NGINX_PORT is written into default.conf at build time. The intranet
|
|
# platform starts `nginx; sleep infinity` and does not run docker-entrypoint.sh.
|
|
FROM node:24-bookworm-slim AS builder
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends git \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
WORKDIR /build
|
|
ENV NEXT_TELEMETRY_DISABLED=1
|
|
|
|
# Install both locked dependency sets before copying source for layer caching.
|
|
COPY package.json package-lock.json ./
|
|
COPY homepage/package.json homepage/package-lock.json ./homepage/
|
|
RUN npm run setup
|
|
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
# Pin the runtime base. Do NOT switch back to floating `nginx:stable-alpine`:
|
|
# that tag is now Alpine 3.24+, which fails to start on intranet hosts with
|
|
# CentOS 7's kernel 3.10 and old libseccomp (the v0.7.0 frontend outage).
|
|
# This digest is nginx 1.30.3 / Alpine 3.23.5, the same base as the frontend
|
|
# image that still starts there. apk stays on the 3.23 repos.
|
|
FROM nginx:1.30.3-alpine@sha256:0d3b80406a13a767339fbe2f41406d6c7da727ab89cf8fae399e81f780f814d1 AS runtime
|
|
# Some deployment platforms wrap the startup command with /bin/bash -c.
|
|
RUN apk add --no-cache bash
|
|
# Baked into default.conf below. Entrypoint still honors a runtime override
|
|
# when it actually runs; the platform path does not.
|
|
ARG WEBSITE_NGINX_PORT=80
|
|
ENV WEBSITE_NGINX_PORT=${WEBSITE_NGINX_PORT}
|
|
COPY deploy/nginx.conf /etc/nginx/conf.d/default.conf
|
|
RUN mkdir -p /etc/nginx/templates \
|
|
&& sed 's/listen 80;/listen ${WEBSITE_NGINX_PORT};/' /etc/nginx/conf.d/default.conf \
|
|
> /etc/nginx/templates/default.conf.template \
|
|
&& sed "s/listen 80;/listen ${WEBSITE_NGINX_PORT};/" /etc/nginx/conf.d/default.conf \
|
|
> /etc/nginx/conf.d/default.conf.baked \
|
|
&& mv /etc/nginx/conf.d/default.conf.baked /etc/nginx/conf.d/default.conf \
|
|
&& grep -q "listen ${WEBSITE_NGINX_PORT};" /etc/nginx/conf.d/default.conf \
|
|
&& rm -rf /usr/share/nginx/html/*
|
|
COPY --from=builder /build/static-site/ /usr/share/nginx/html/
|
|
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
|
RUN chmod +x /docker-entrypoint.sh
|
|
EXPOSE ${WEBSITE_NGINX_PORT}
|
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|