This commit is contained in:
MarkLo 2025-11-22 01:26:09 +08:00
parent 234e7fbcd7
commit ed8ae5687c
1 changed files with 5 additions and 2 deletions

View File

@ -16,13 +16,16 @@ RUN pnpm install --frozen-lockfile
# Rebuild the source code only when needed
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY frontend .
# Enable pnpm
RUN corepack enable && corepack prepare pnpm@latest --activate
COPY --from=deps /app/node_modules ./node_modules
COPY frontend .
# Accept BACKEND_URL as build argument
ARG BACKEND_URL
ENV BACKEND_URL=${BACKEND_URL}
# Build Next.js app
RUN pnpm run build