diff --git a/web/Dockerfile.dev b/web/Dockerfile.dev index 0bcabc117..3c7610ece 100644 --- a/web/Dockerfile.dev +++ b/web/Dockerfile.dev @@ -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 diff --git a/web/next.config.js b/web/next.config.js index 2ff1e0f40..e185707da 100644 --- a/web/next.config.js +++ b/web/next.config.js @@ -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, }, ];