/** @type {import('next').NextConfig} */ const nextConfig = { // Required for Docker image (Dokploy). Local Windows may skip via unset DOCKER_BUILD. output: process.env.DOCKER_BUILD === "1" ? "standalone" : undefined, async rewrites() { const apiUrl = process.env.NEXT_PUBLIC_API_URL ?? "http://localhost:3000"; return [ { source: "/api/:path*", destination: `${apiUrl}/api/:path*`, }, ]; }, }; module.exports = nextConfig;