Skip to content
This repository was archived by the owner on Jun 28, 2025. It is now read-only.

Commit 2750083

Browse files
committed
fix(web): production Dockerfile to use standalone output
1 parent b1bfbbd commit 2750083

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

web/Dockerfile.prod

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ WORKDIR /app
2222
COPY --from=deps /app/node_modules ./node_modules
2323
COPY . .
2424

25-
# Next.js collects completely anonymous telemetry data about general usage.
26-
# Learn more here: https://nextjs.org/telemetry
27-
# Uncomment the following line in case you want to disable telemetry during the build.
28-
# ENV NEXT_TELEMETRY_DISABLED 1
25+
ENV NEXT_TELEMETRY_DISABLED 1
2926

3027
RUN \
3128
if [ -f yarn.lock ]; then yarn run build; \
@@ -39,8 +36,7 @@ FROM base AS runner
3936
WORKDIR /app
4037

4138
ENV NODE_ENV production
42-
# Uncomment the following line in case you want to disable telemetry during runtime.
43-
# ENV NEXT_TELEMETRY_DISABLED 1
39+
ENV NEXT_TELEMETRY_DISABLED 1
4440

4541
RUN addgroup --system --gid 1001 nodejs
4642
RUN adduser --system --uid 1001 nextjs
@@ -53,7 +49,7 @@ RUN chown nextjs:nodejs .next
5349

5450
# Automatically leverage output traces to reduce image size
5551
# https://nextjs.org/docs/advanced-features/output-file-tracing
56-
# COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
52+
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
5753
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
5854

5955
USER nextjs

web/next.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const nextConfig = {
77
};
88
return config;
99
},
10+
output: "standalone",
1011
};
1112

1213
module.exports = nextConfig;

0 commit comments

Comments
 (0)