fix: enable standalone output and remove public directory copy
All checks were successful
Build and Push Docker Image to Gitea / build-and-push (push) Successful in 1m38s

- Re-enable output: 'standalone' in next.config.ts for Docker builds
- Remove public directory copy from Dockerfile (not needed for this project)
- Standalone mode works with force-dynamic routing to prevent SSR issues

Fixes Gitea Actions build failure where .next/standalone was not found
This commit is contained in:
2025-11-23 19:00:34 +01:00
parent 8273848837
commit f2d89d8333
2 changed files with 3 additions and 4 deletions

View File

@@ -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

View File

@@ -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;