From a11ea38c88ac564b8e7223186aa05b5283d0aa3e Mon Sep 17 00:00:00 2001 From: nomi-nonsz Date: Tue, 18 Feb 2025 22:28:11 +0700 Subject: [PATCH] standalone? --- Dockerfile | 7 ++++++- next.config.mjs | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index ca79c2c..1fbacfc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ COPY package.json yarn.lock ./ RUN yarn install --frozen-lockfile COPY . . -COPY ./src/app/favicon.ico ./public/favicon.ico +# COPY ./src/app/favicon.ico ./public/favicon.ico RUN yarn build @@ -17,8 +17,13 @@ FROM node:18-alpine AS runner WORKDIR /app +RUN addgroup --system --gid 1001 nodejs +RUN adduser --system --gid 1001 nextjs + ENV NODE_ENV production +USER nextjs + COPY --from=builder /app/public ./public COPY --from=builder /app/.next/standalone ./ COPY --from=builder /app/.next/static ./.next/static diff --git a/next.config.mjs b/next.config.mjs index be8a859..fd0832f 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -8,7 +8,9 @@ const nextConfig = { pathname: '/1BCeG1aTiBAAAAAd/temptation-stairway-ena.gif' } ] - } + }, + output: 'standalone', + productionBrowserSourceMaps: false }; export default nextConfig;