2 Commits
1.0.1 ... 1.0.3

Author SHA1 Message Date
zzc
dc682c0c63 build: drone node version npm
All checks were successful
continuous-integration/drone/tag Build is passing
2026-01-05 09:39:30 +08:00
zzc
ad292b5eb8 build: drone node version
Some checks failed
continuous-integration/drone/tag Build is failing
2026-01-05 09:23:19 +08:00

View File

@@ -1,5 +1,5 @@
# 1⃣ 构建阶段 # 1⃣ 构建阶段
FROM node:18 AS build FROM images.lihailezzc.com/library/node:20-alpine as build
# 设置工作目录 # 设置工作目录
WORKDIR /app WORKDIR /app
@@ -10,6 +10,7 @@ COPY . .
ENV CI=true ENV CI=true
ENV NODE_OPTIONS=--openssl-legacy-provider ENV NODE_OPTIONS=--openssl-legacy-provider
RUN npm config set registry https://registry.npmmirror.com
RUN npm install pnpm -g RUN npm install pnpm -g
RUN pnpm install --force RUN pnpm install --force
@@ -19,7 +20,7 @@ RUN pnpm run build
# 2⃣ 生产部署阶段(用 nginx 托管) # 2⃣ 生产部署阶段(用 nginx 托管)
FROM nginx:alpine FROM images.lihailezzc.com/library/node:20-alpine
# 拷贝构建好的 dist 到 nginx 的 html 目录 # 拷贝构建好的 dist 到 nginx 的 html 目录
COPY --from=build /app/dist /usr/share/nginx/html COPY --from=build /app/dist /usr/share/nginx/html