feat: isolate BossAI website with Next.js

This commit is contained in:
boos
2026-06-06 05:30:10 +08:00
parent d75daf72d6
commit 03046152fd
21 changed files with 3153 additions and 1085 deletions
+29
View File
@@ -0,0 +1,29 @@
import type { NextConfig } from "next";
const backendUrl = process.env.BOSSAI_BACKEND_URL || "http://127.0.0.1:4000";
const nextConfig: NextConfig = {
output: "standalone",
poweredByHeader: false,
turbopack: {
root: __dirname,
},
async rewrites() {
return [
{ source: "/boos", destination: `${backendUrl}/boos` },
{ source: "/user/:path*", destination: `${backendUrl}/user/:path*` },
{ source: "/api/:path*", destination: `${backendUrl}/api/:path*` },
{ source: "/v1/:path*", destination: `${backendUrl}/v1/:path*` },
{ source: "/assets/:path*", destination: `${backendUrl}/assets/:path*` },
{ source: "/workflow-ui/:path*", destination: `${backendUrl}/workflow-ui/:path*` },
{ source: "/comfyui/:path*", destination: `${backendUrl}/comfyui/:path*` },
{ source: "/monitor-proxy/:path*", destination: `${backendUrl}/monitor-proxy/:path*` },
{ source: "/oauth/:path*", destination: `${backendUrl}/oauth/:path*` },
{ source: "/health", destination: `${backendUrl}/health` },
{ source: "/ready", destination: `${backendUrl}/ready` },
{ source: "/metrics", destination: `${backendUrl}/metrics` },
];
},
};
export default nextConfig;