fix: js 执行崩溃
Some checks failed
continuous-integration/drone/push Build is failing

- deps and types.
- use pnpm instead of npm.
- fix cpu 100%.
This commit is contained in:
2022-10-08 22:45:31 +08:00
parent 85fa2ae57f
commit 2ed23c4327
9 changed files with 8033 additions and 22959 deletions

View File

@@ -2,13 +2,15 @@ FROM node:16-alpine as base
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package-lock.json package.json ./
RUN npm ci --no-audit --legacy-peer-deps
RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@7 &&\
pnpm i &&\
pnpm build
COPY . .
FROM node:16-alpine as release
WORKDIR /app
COPY --from=base /app ./
RUN npm run build &&\
npm prune --omit dev --legacy-peer-deps
RUN pnpm build &&\
pnpm prune --prod
EXPOSE 80
CMD npm run serve -- --port 80
CMD pnpm serve -p 80