From 6ece7469b94fbac1eefea6b463820efe3f39faec Mon Sep 17 00:00:00 2001 From: Jagger <634750802@qq.com> Date: Sat, 14 Sep 2024 10:17:19 +0800 Subject: [PATCH] fix next config --- .env.production | 21 +++++++-------------- next.config.js | 4 +--- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/.env.production b/.env.production index dbf028337..64f016ed0 100644 --- a/.env.production +++ b/.env.production @@ -1,22 +1,15 @@ -NEXT_PUBLIC_RUNTIME_ENV=production -NEXT_PUBLIC_HOME_URL=https://tidb.net -NEXT_PUBLIC_ACCOUNTS_BASE_URL=https://accounts.pingcap.cn +NEXT_PUBLIC_RUNTIME_ENV=preview +NEXT_PUBLIC_HOME_URL=https://community-preview.tidb.net +NEXT_PUBLIC_ACCOUNTS_BASE_URL=https://accounts-preview.pingcap.cn NEXT_PUBLIC_API_BASE_URL=$NEXT_PUBLIC_HOME_URL NEXT_PUBLIC_LOCALES_BASE_URL=$NEXT_PUBLIC_HOME_URL/locales NEXT_PUBLIC_STRAPI_BASE_URL=http://community-cms.default.svc.cluster.local -NEXT_PUBLIC_ASKTUG_WEBSITE_BASE_URL=https://asktug.com -NEXT_PUBLIC_ASKTUG_PROXY_BASE_URL=$NEXT_PUBLIC_HOME_URL/_asktug - -# Available feature toggles NEXT_PUBLIC_FT_ACTIVITIES=true - -# DSN of pingcap/tug-website -SENTRY_DSN=https://cc3bce60904940f8a8e5795ef6be2ae7@o226447.ingest.sentry.io/5756513 -NEXT_PUBLIC_SENTRY_DSN=$SENTRY_DSN -NEXT_PUBLIC_CDN_URL=https://img1.tidb.net NEXT_PUBLIC_CMS_CDN_URL=https://img3.pingcap.com +NEXT_PUBLIC_CDN_URL=https://tidb-net-preview.oss-cn-beijing.aliyuncs.com +NEXT_PUBLIC_ASKTUG_PROXY_BASE_URL=$NEXT_PUBLIC_HOME_URL/_asktug +NEXT_PUBLIC_ASKTUG_WEBSITE_BASE_URL=https://new.asktug.com SENTRY_ORG=pingcap SENTRY_PROJECT=tug-website -ENABLE_SENTRY=true +ENABLE_SENTRY=false SENTRY_NO_PROGRESS_BAR=1 -SENTRY_LOG_LEVEL=debug diff --git a/next.config.js b/next.config.js index 56f498858..be4e38b77 100644 --- a/next.config.js +++ b/next.config.js @@ -5,9 +5,7 @@ const { withSentryConfig } = require('@sentry/nextjs'); const { i18n } = require('./next-i18next.config'); -const os = require('os'); -const platform = os.platform(); -const outputStandaloneEnable = platform === 'linux'; +const outputStandaloneEnable = !!process.env.CI; const unifyNodeModules = (names) => names.reduce(