🔀 merge: 合并 2.7.0 后端并固定新版管理前端构建
Deploy VitePress site to Pages / build (push) Canceled after 0s
Deploy VitePress site to Pages / Deploy (push) Canceled after 0s
Create release / release-please (push) Canceled after 0s
Build and push Docker image / buildx (push) Canceled after 0s

This commit is contained in:
orion committed 2026-09-18 10:30:39 +08:00
commit 96e8eeac39
34 files changed
+1725 -336

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
# Build the exact reviewed 2026 frontend while preserving the existing legacy themes.
ARG BASE_IMAGE
FROM --platform=$BUILDPLATFORM node:22-alpine AS frontend
ARG FRONTEND_2026_REPO=https://git.orionc.me/orion/FileCodeBoxFronted2026.git
ARG FRONTEND_2026_REF
RUN apk add --no-cache git && corepack enable && corepack prepare pnpm@9.15.9 --activate
WORKDIR /build
RUN test -n "$FRONTEND_2026_REF" && \
git init . && git remote add origin "$FRONTEND_2026_REPO" && \
git fetch --depth 1 origin "$FRONTEND_2026_REF" && git checkout --detach FETCH_HEAD && \
test "$(git rev-parse HEAD)" = "$FRONTEND_2026_REF" && \
pnpm install --frozen-lockfile --prod=false && \
node --experimental-strip-types --test --experimental-test-coverage tests/*.test.mjs && \
pnpm run build
FROM ${BASE_IMAGE}
ARG APP_VERSION
ARG VCS_REF
ARG FRONTEND_2026_REF
LABEL org.opencontainers.image.version="${APP_VERSION}"
LABEL org.opencontainers.image.revision="${VCS_REF}"
LABEL org.opencontainers.image.filecodebox.frontend-2026-revision="${FRONTEND_2026_REF}"
WORKDIR /app
COPY VERSION requirements.txt main.py ./
COPY apps ./apps
COPY core ./core
COPY scripts ./scripts
RUN pip install --no-cache-dir -r requirements.txt
COPY --from=frontend /build/dist ./themes/2026
ENV APP_VERSION="${APP_VERSION}"