build: drone node version npm
All checks were successful
continuous-integration/drone/tag Build is passing
All checks were successful
continuous-integration/drone/tag Build is passing
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user