/** @type {import('next').NextConfig} */ const nextConfig = { // Enable standalone output for Docker output: 'standalone', // Optimize for Docker outputFileTracingRoot: '/app', // Image optimization images: { remotePatterns: [ { protocol: 'https', hostname: '**', }, ], }, // API configuration async headers() { return [ { source: '/api/:path*', headers: [ { key: 'Cache-Control', value: 'no-store, max-age=0', }, ], }, ]; }, // Webpack configuration for Docker webpack: (config, { isServer }) => { if (!isServer) { config.resolve.fallback = { ...config.resolve.fallback, fs: false, net: false, tls: false, }; } return config; }, }; export default nextConfig;