mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-09-19 03:58:30 +02:00
@@ -18,6 +18,9 @@ FROM base AS builder
|
|||||||
RUN apk add --no-cache libc6-compat
|
RUN apk add --no-cache libc6-compat
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Add NODE_OPTIONS argument
|
||||||
|
ARG NODE_OPTIONS
|
||||||
|
|
||||||
# pull in source code / package.json / package-lock.json
|
# pull in source code / package.json / package-lock.json
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
@@ -78,7 +81,8 @@ ENV NEXT_PUBLIC_GTM_ENABLED=${NEXT_PUBLIC_GTM_ENABLED}
|
|||||||
ARG NEXT_PUBLIC_FORGOT_PASSWORD_ENABLED
|
ARG NEXT_PUBLIC_FORGOT_PASSWORD_ENABLED
|
||||||
ENV NEXT_PUBLIC_FORGOT_PASSWORD_ENABLED=${NEXT_PUBLIC_FORGOT_PASSWORD_ENABLED}
|
ENV NEXT_PUBLIC_FORGOT_PASSWORD_ENABLED=${NEXT_PUBLIC_FORGOT_PASSWORD_ENABLED}
|
||||||
|
|
||||||
RUN npx next build
|
# Use NODE_OPTIONS in the build command
|
||||||
|
RUN NODE_OPTIONS="${NODE_OPTIONS}" npx next build
|
||||||
|
|
||||||
# Step 2. Production image, copy all the files and run next
|
# Step 2. Production image, copy all the files and run next
|
||||||
FROM base AS runner
|
FROM base AS runner
|
||||||
|
@@ -86,14 +86,16 @@ const sentryWebpackPluginOptions = {
|
|||||||
authToken: process.env.SENTRY_AUTH_TOKEN,
|
authToken: process.env.SENTRY_AUTH_TOKEN,
|
||||||
silent: !sentryEnabled, // Silence output when Sentry is disabled
|
silent: !sentryEnabled, // Silence output when Sentry is disabled
|
||||||
dryRun: !sentryEnabled, // Don't upload source maps when Sentry is disabled
|
dryRun: !sentryEnabled, // Don't upload source maps when Sentry is disabled
|
||||||
sourceMaps: {
|
...(sentryEnabled && {
|
||||||
include: ["./.next"],
|
sourceMaps: {
|
||||||
ignore: ["node_modules"],
|
include: ["./.next"],
|
||||||
urlPrefix: "~/_next",
|
ignore: ["node_modules"],
|
||||||
stripPrefix: ["webpack://_N_E/"],
|
urlPrefix: "~/_next",
|
||||||
validate: true,
|
stripPrefix: ["webpack://_N_E/"],
|
||||||
cleanArtifacts: true,
|
validate: true,
|
||||||
},
|
cleanArtifacts: true,
|
||||||
|
},
|
||||||
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
// Export the module with conditional Sentry configuration
|
// Export the module with conditional Sentry configuration
|
||||||
|
Reference in New Issue
Block a user