File tree 3 files changed +7
-2
lines changed
3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 173
173
# ENABLE_CACHE=
174
174
# VERCEL_ENV=
175
175
# NEXT_PUBLIC_VERSION=
176
+ # NEXT_BUILD_STANDALONE=
Original file line number Diff line number Diff line change @@ -14,16 +14,20 @@ RUN yarn install --frozen-lockfile
14
14
# 2. Rebuild the source code only when needed
15
15
FROM base AS builder
16
16
ARG NOTION_PAGE_ID
17
+ ENV NEXT_BUILD_STANDALONE=true
18
+
17
19
WORKDIR /app
20
+
18
21
COPY --from=deps /app/node_modules ./node_modules
19
22
COPY . .
20
23
RUN yarn build
21
24
22
25
# 3. Production image, copy all the files and run next
23
26
FROM base AS runner
27
+ ENV NODE_ENV=production
28
+
24
29
WORKDIR /app
25
30
26
- ENV NODE_ENV=production
27
31
28
32
COPY --from=builder /app/public ./public
29
33
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ const nextConfig = {
84
84
eslint : {
85
85
ignoreDuringBuilds : true
86
86
} ,
87
- output : process . env . EXPORT ? 'export' : ' standalone',
87
+ output : process . env . EXPORT ? 'export' : process . env . NEXT_BUILD_STANDALONE === 'true' ? ' standalone' : undefined ,
88
88
staticPageGenerationTimeout : 120 ,
89
89
// 多语言, 在export时禁用
90
90
i18n : process . env . EXPORT
You can’t perform that action at this time.
0 commit comments