diff --git a/Dockerfile b/Dockerfile index 1e5fb00..7c0ef1b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,10 +24,8 @@ RUN addgroup -g 1001 nodejs \ && adduser -u 1001 -G nodejs -s /bin/sh -D nextjs # Copy only what is needed for runtime +COPY --from=builder /app/.next/standalone ./ COPY --from=builder /app/public ./public -COPY --from=builder /app/.next ./.next -COPY --from=builder /app/node_modules ./node_modules -COPY --from=builder /app/package.json ./package.json USER nextjs diff --git a/next.config.ts b/next.config.ts index e9ffa30..bff4933 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,7 +1,7 @@ import type { NextConfig } from "next"; const nextConfig: NextConfig = { - /* config options here */ + output: "standalone" }; export default nextConfig;