diff --git a/web/Dockerfile b/web/Dockerfile index 46ec203250e..185b5f74b36 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20-alpine AS base +FROM --platform=linux/amd64 node:20-alpine AS base LABEL com.danswer.maintainer="founders@danswer.ai" LABEL com.danswer.description="This image is the web/frontend container of Danswer which \ @@ -66,7 +66,7 @@ ARG NEXT_PUBLIC_POSTHOG_HOST ENV NEXT_PUBLIC_POSTHOG_KEY=${NEXT_PUBLIC_POSTHOG_KEY} ENV NEXT_PUBLIC_POSTHOG_HOST=${NEXT_PUBLIC_POSTHOG_HOST} -RUN npx next build +RUN npx next build --no-lint # Step 2. Production image, copy all the files and run next FROM base AS runner diff --git a/web/next.config.js b/web/next.config.js index 3b4c7bbd379..9d491dbf90c 100644 --- a/web/next.config.js +++ b/web/next.config.js @@ -21,9 +21,10 @@ const nextConfig = { // - With both configured: Only unhandled errors are captured (no performance/session tracking) // Determine if Sentry should be enabled -const sentryEnabled = Boolean( - process.env.SENTRY_AUTH_TOKEN && process.env.NEXT_PUBLIC_SENTRY_DSN -); +const sentryEnabled = false; +// Boolean( +// process.env.SENTRY_AUTH_TOKEN && process.env.NEXT_PUBLIC_SENTRY_DSN +// ); // Sentry webpack plugin options const sentryWebpackPluginOptions = { diff --git a/web/src/app/layout.tsx b/web/src/app/layout.tsx index e7e3c2c416d..4d5b21028c5 100644 --- a/web/src/app/layout.tsx +++ b/web/src/app/layout.tsx @@ -23,11 +23,11 @@ import { default as dynamicImport } from "next/dynamic"; const PostHogPageView = dynamicImport(() => import("./PostHogPageView"), { ssr: false, }); - const inter = Inter({ subsets: ["latin"], variable: "--font-inter", - display: "swap", + preload: false, // Add this to prevent build-time font loading issues + adjustFontFallback: true, // Add this to ensure smooth fallback }); export async function generateMetadata(): Promise { diff --git a/web/src/middleware.ts b/web/src/middleware.ts index 06c106fffc4..4cb5fcc9f1c 100644 --- a/web/src/middleware.ts +++ b/web/src/middleware.ts @@ -12,9 +12,7 @@ const eePaths = [ "/admin/whitelabeling/:path*", "/admin/performance/custom-analytics/:path*", "/admin/standard-answer/:path*", - ...(process.env.NEXT_PUBLIC_CLOUD_ENABLED - ? ["/admin/cloud-settings/:path*"] - : []), + "/admin/cloud-settings/:path*", ]; // removes the "/:path*" from the end @@ -46,5 +44,14 @@ export async function middleware(request: NextRequest) { // Specify the paths that the middleware should run for export const config = { - matcher: eePaths, + matcher: [ + "/admin/groups/:path*", + "/admin/api-key/:path*", + "/admin/performance/usage/:path*", + "/admin/performance/query-history/:path*", + "/admin/whitelabeling/:path*", + "/admin/performance/custom-analytics/:path*", + "/admin/standard-answer/:path*", + "/admin/cloud-settings/:path*", + ], };