fix(frontend): copy .npmrc into docker builds, use glibc build stage
CI / backend (push) Canceled after 0s
CI / frontend (push) Canceled after 0s

npm ci in the images ran without frontend/.npmrc, so the eslint 9/10 peer
conflict aborted it (legacy-peer-deps=true lives in .npmrc). The release
build stage also used alpine/musl, where npm ci skipped the rolldown
native bindings and vite build failed; build on glibc like dev instead.
This commit is contained in:
2026-09-16 23:45:12 +08:00
parent ef57b194f4
commit c2aae7e4e0
3 changed files with 6 additions and 3 deletions
+3
View File
@@ -93,6 +93,9 @@ The format loosely follows Keep a Changelog and can be adapted to the team's hab
### Fixed / 修复 ### Fixed / 修复
- Frontend Docker builds (dev & release) work again: the Dockerfiles now copy `frontend/.npmrc` (so `npm ci` honors `legacy-peer-deps=true` instead of failing on the eslint 9/10 peer conflict), and the release build stage uses the glibc `node:22` base, where the rolldown native bindings install reliably (the alpine/musl run skipped them, breaking `vite build`).
- 前端 Docker 构建(dev/release)修复:Dockerfile 补拷 `frontend/.npmrc`(镜像内 `npm ci` 恢复遵循 `legacy-peer-deps=true`,不再因 eslint 9/10 peer 冲突失败);release 构建阶段改用 glibc 的 `node:22` 基础镜像,rolldown 原生绑定安装恢复稳定(alpine/musl 下会漏装导致 `vite build` 失败)。
- Accessibility fixes: login screen muted text meets WCAG AA contrast in light theme (muted-foreground token darkened); the CBZ reading pane is now keyboard-scrollable (scroll container is focusable). - Accessibility fixes: login screen muted text meets WCAG AA contrast in light theme (muted-foreground token darkened); the CBZ reading pane is now keyboard-scrollable (scroll container is focusable).
- 无障碍修复:登录页弱化文本在亮色主题下达到 WCAG AA 对比度(muted-foreground 色值加深);CBZ 阅读面板现在可用键盘滚动(滚动容器可聚焦)。 - 无障碍修复:登录页弱化文本在亮色主题下达到 WCAG AA 对比度(muted-foreground 色值加深);CBZ 阅读面板现在可用键盘滚动(滚动容器可聚焦)。
+1 -1
View File
@@ -1,6 +1,6 @@
FROM node:22 AS dev FROM node:22 AS dev
WORKDIR /app WORKDIR /app
COPY frontend/package.json frontend/package-lock.json ./ COPY frontend/package.json frontend/package-lock.json frontend/.npmrc ./
RUN npm ci RUN npm ci
EXPOSE 5173 EXPOSE 5173
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"] CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]
+2 -2
View File
@@ -1,6 +1,6 @@
FROM node:22-alpine AS build FROM node:22 AS build
WORKDIR /src WORKDIR /src
COPY frontend/package.json frontend/package-lock.json ./ COPY frontend/package.json frontend/package-lock.json frontend/.npmrc ./
RUN npm ci RUN npm ci
COPY frontend/ ./ COPY frontend/ ./
RUN npm run build RUN npm run build