diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 4c9554a..193328a 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -63,6 +63,7 @@ jobs: secrets: | TURBO_TOKEN=${{ secrets.TURBO_TOKEN }} TURBO_TEAM=${{ secrets.TURBO_TEAM }} + SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} chat: name: Push chat module to Docker Hub runs-on: ubuntu-latest diff --git a/apps/web/Dockerfile b/apps/web/Dockerfile index 5c89d15..fef07a0 100644 --- a/apps/web/Dockerfile +++ b/apps/web/Dockerfile @@ -38,9 +38,10 @@ COPY --from=builder /app/out/json/ . RUN yarn install --frozen-lockfile COPY --from=builder /app/out/full/ . -RUN --mount=type=secret,id=TURBO_TOKEN --mount=type=secret,id=TURBO_TEAM \ +RUN --mount=type=secret,id=TURBO_TOKEN --mount=type=secret,id=TURBO_TEAM --mount=type=secret,id=SENTRY_AUTH_TOKEN \ COMMIT=$(cat /tmp/commit_hash 2>/dev/null || echo "unknown") && \ TURBO_TOKEN=$(cat /run/secrets/TURBO_TOKEN) TURBO_TEAM=$(cat /run/secrets/TURBO_TEAM) \ + SENTRY_AUTH_TOKEN=$(cat /run/secrets/SENTRY_AUTH_TOKEN) \ commit=$COMMIT yarn turbo run build --env-mode=loose FROM base AS runner diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjs index 9b15298..ec723f0 100644 --- a/apps/web/next.config.mjs +++ b/apps/web/next.config.mjs @@ -69,6 +69,9 @@ export default withSentryConfig(nextConfig, { project: "hctv", + // Auth token for uploading source maps + authToken: process.env.SENTRY_AUTH_TOKEN, + // Only print logs for uploading source maps in CI silent: !process.env.CI, @@ -78,6 +81,9 @@ export default withSentryConfig(nextConfig, { // Upload a larger set of source maps for prettier stack traces (increases build time) widenClientFileUpload: true, + // Hides source maps from generated client bundles + hideSourceMaps: true, + // Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers. // This can increase your server load as well as your hosting bill. // Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-