mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-03-17 21:32:36 +01:00
k
This commit is contained in:
parent
aa0f307cc7
commit
c32d428eb7
@ -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
|
||||
|
@ -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 = {
|
||||
|
@ -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<Metadata> {
|
||||
|
@ -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*",
|
||||
],
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user