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
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:
@@ -49,8 +49,8 @@ RUN addgroup --system --gid 1001 nodejs && \
|
|||||||
adduser --system --uid 1001 nextjs
|
adduser --system --uid 1001 nextjs
|
||||||
|
|
||||||
# Copy necessary files from builder
|
# Copy necessary files from builder
|
||||||
COPY --from=builder /app/public ./public
|
# Note: public directory is optional - only copy if it exists
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
COPY --from=builder /app/.next/standalone ./
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
||||||
|
|
||||||
# Switch to non-root user
|
# Switch to non-root user
|
||||||
|
|||||||
@@ -2,8 +2,7 @@ import type { NextConfig } from 'next';
|
|||||||
|
|
||||||
const nextConfig: NextConfig = {
|
const nextConfig: NextConfig = {
|
||||||
reactStrictMode: true,
|
reactStrictMode: true,
|
||||||
// Note: Using default mode (not standalone) to avoid SSR issues with client components
|
output: 'standalone',
|
||||||
// For Docker, we'll use regular server mode which works fine
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default nextConfig;
|
export default nextConfig;
|
||||||
|
|||||||
Reference in New Issue
Block a user