mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 07:33:07 +08:00
build: migrate CI and Docker setup to pnpm
This commit is contained in:
+10
-5
@@ -1,12 +1,17 @@
|
||||
# Base stage for building the static files
|
||||
FROM node:lts AS base
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
|
||||
# Install pnpm
|
||||
RUN corepack enable && corepack prepare pnpm@latest --activate
|
||||
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
RUN pnpm install --frozen-lockfile
|
||||
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
RUN pnpm run build
|
||||
|
||||
# Runtime stage for serving the application
|
||||
FROM nginx:mainline-alpine-slim AS runtime
|
||||
COPY --from=base ./app/dist /usr/share/nginx/html
|
||||
EXPOSE 80
|
||||
COPY --from=base /app/dist /usr/share/nginx/html
|
||||
EXPOSE 80
|
||||
|
||||
Reference in New Issue
Block a user