diff --git a/Dockerfile b/Dockerfile index 0ea7eed..ec1341a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,8 +49,8 @@ RUN addgroup --system --gid 1001 nodejs && \ adduser --system --uid 1001 nextjs # Copy necessary files from builder -COPY --from=builder /app/public ./public -COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ +# Note: public directory is optional - only copy if it exists +COPY --from=builder /app/.next/standalone ./ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static # Switch to non-root user diff --git a/next.config.ts b/next.config.ts index 31bb80d..130bf5b 100644 --- a/next.config.ts +++ b/next.config.ts @@ -2,8 +2,7 @@ import type { NextConfig } from 'next'; const nextConfig: NextConfig = { reactStrictMode: true, - // Note: Using default mode (not standalone) to avoid SSR issues with client components - // For Docker, we'll use regular server mode which works fine + output: 'standalone', }; export default nextConfig;