mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-04-08 03:48:14 +02:00
Fix dev web server setup
This commit is contained in:
parent
f4ef92e279
commit
49804dcc44
@ -16,6 +16,8 @@ COPY src ./src
|
||||
COPY public ./public
|
||||
COPY next.config.js .
|
||||
COPY tsconfig.json .
|
||||
COPY tailwind.config.js .
|
||||
COPY postcss.config.js .
|
||||
|
||||
# Next.js collects completely anonymous telemetry data about general usage. Learn more here: https://nextjs.org/telemetry
|
||||
# Uncomment the following line to disable telemetry at run time
|
||||
|
@ -6,16 +6,14 @@ const nextConfig = {
|
||||
output: "standalone",
|
||||
redirects: async () => {
|
||||
// In production, something else (nginx in the one box setup) should take
|
||||
// care of this redirect. Leaving in for now due to issues with dev setup
|
||||
// and accessing `process.env.NODE_ENV` + for cases where people don't want
|
||||
// to setup nginx and are okay with the frontend proxying the request.
|
||||
// TODO (chris): better support non-nginx setups
|
||||
// care of this redirect. TODO (chris): better support setups where
|
||||
// web_server and api_server are on different machines.
|
||||
if (process.env.NODE_ENV === "production") return [];
|
||||
|
||||
return [
|
||||
{
|
||||
source: "/api/:path*",
|
||||
destination: `${
|
||||
process.env.INTERNAL_URL || "http://localhost:8080"
|
||||
}/:path*`, // Proxy to Backend
|
||||
destination: "http://localhost:8080/:path*", // Proxy to Backend
|
||||
permanent: true,
|
||||
},
|
||||
];
|
||||
|
Loading…
x
Reference in New Issue
Block a user