import type { NextConfig } from "next"; /** * Ingest API backend (same LXC, port 3041). * In Docker Compose the service name is "ingest-api"; on bare-metal it is localhost. */ const INGEST_API_URL = process.env.INGEST_API_URL || "http://127.0.0.1:3041"; const nextConfig: NextConfig = { output: "standalone", reactStrictMode: true, async rewrites() { return [ { source: "/health", destination: `${INGEST_API_URL}/health` }, { source: "/v1/:path*", destination: `${INGEST_API_URL}/v1/:path*` }, ]; }, }; export default nextConfig;