mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-18 07:26:48 +00:00
feat: 仅对NEXT_BUILD_STANDALONE=true生效
This commit is contained in:
@@ -14,16 +14,20 @@ RUN yarn install --frozen-lockfile
|
||||
# 2. Rebuild the source code only when needed
|
||||
FROM base AS builder
|
||||
ARG NOTION_PAGE_ID
|
||||
ENV NEXT_BUILD_STANDALONE=true
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
RUN yarn build
|
||||
|
||||
# 3. Production image, copy all the files and run next
|
||||
FROM base AS runner
|
||||
ENV NODE_ENV=production
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
COPY --from=builder /app/public ./public
|
||||
|
||||
|
||||
Reference in New Issue
Block a user