mirror of
https://github.com/Tencent/WeKnora.git
synced 2026-10-24 23:12:53 +08:00
* docs: sync website-docs with changes since v0.8.0 Audit every change between v0.8.0 and the v0.8.2 release against the documentation site, adding what users and operators need and correcting statements that no longer match the code. - Add local browser (BrowserSkill), built-in MCP Server endpoints, the toolbox, conversation steer/fork/rewind and reasoning effort, the artifacts library, sandbox terminal and desktop, the Lite host sandbox, the rebuilt model catalog (including a protocol-compat field reference), Confluence and DingTalk Docs sources, Bocha/Serply search, per-channel IM locale, whitelist-only outbound, admin user creation, new configuration variables and migrations 000091-000110. - Fix wrong API examples and parameters (model type values, knowledge search params, FAQ match_count cap, Notion credentials), tenant deletion semantics, default timeouts, parser engine claims, removed tables and commands, stale navigation paths, and route locations after the router split into routes_*.go. - Add screenshots for the new pages and refresh outdated ones. * fix(frontend): link the protocol-compat field to its documentation The model editor told users to read catalog/compat.go on the backend, a path that no longer exists after the model catalog refactor. The hint now says when the override is needed and links to the field reference in website-docs/03-features/06-models.md; the config examples and the API type comment point to the same place. * feat(website): showcase v0.8.2 on the homepage - Add a v0.8.2 section for the local browser (BrowserSkill), the built-in MCP Server and conversation control, and turn the v0.8.0 release block into a standing skills & sandbox topic with the sandbox desktop and terminal. - Replace the three-up galleries with a feature list beside one large screenshot: every item's text stays visible, clicking an item or one of its views switches the image with a cross-fade, and the list plays itself while on screen until the visitor picks something. - Add Confluence, DingTalk, BrowserSkill and more model vendors to the integrations, bump the header badge to v0.8.2 and link the changelog. - check-site reports missing docs screenshots as pending instead of failing, since the Screenshot component renders a placeholder for them. * docs(changelog): add v0.8.2 release notes * docs(website): add per-version release notes pages Add a "版本发布" docs section with one page per release, starting with v0.8.2 and a backfilled v0.8.0. Each page walks through the highlights with the existing product screenshots, the other improvements and fixes, and an upgrade checklist with the actions each breaking change needs. The sidebar orders these pages by version, newest first; the docs header gains a 版本 entry, and the homepage's v0.8.2 section now links to the release notes page instead of the raw CHANGELOG. * feat(website): let the site image listen on a configurable port The Docker image hard-coded `listen 80`, so running it with host networking or on a platform that assigns the container port required editing the Nginx config and rebuilding. The image now renders its config from the official nginx template directory at startup and reads the listen port from `PORT` (default 80); deploy/nginx.conf stays a plain config for static deployments. test-docker starts a second container with PORT=8080 and checks the rendered config and that the site answers on that port; the README documents the variable. * fix(website): namespace the nginx listen port variable * fix(website): support bash-wrapped container startup * fix(website): align nginx startup with frontend entrypoint * fix(website): pin nginx runtime for older host compatibility * fix(website): bake the configured nginx port into the image
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 weknora-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"]
|