Merge branch 'main' into feat/multi-arch-docker-and-backend-proxy

This commit is contained in:
David Parry
2026-03-11 15:05:55 +11:00
committed by GitHub
+13
View File
@@ -1,5 +1,10 @@
import type { NextConfig } from "next";
// BACKEND_URL is a plain (non-NEXT_PUBLIC_) env var read at server startup —
// not baked at build time — so it can be set in docker-compose `environment`.
// Defaults to localhost for local dev where both services run on the same host.
const backendUrl = process.env.BACKEND_URL ?? "http://localhost:8000";
const nextConfig: NextConfig = {
transpilePackages: ['react-map-gl', 'mapbox-gl', 'maplibre-gl'],
output: "standalone",
@@ -9,6 +14,14 @@ const nextConfig: NextConfig = {
eslint: {
ignoreDuringBuilds: true,
},
async rewrites() {
return [
{
source: "/api/:path*",
destination: `${backendUrl}/api/:path*`,
},
];
},
};
export default nextConfig;