From e4a6d6e817b48cfd591c953a2213714ac334c540 Mon Sep 17 00:00:00 2001 From: zhangheng Date: Mon, 6 Jul 2026 18:45:13 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20add=20per-environment=20env=20config?= =?UTF-8?q?=20(=E5=8F=82=E8=80=83=20uirefbase)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit .env.development/.staging/.production and track env files in git (matching uirefbase convention). No secrets: SSO_URL (sso-mock service), NEXT_PUBLIC_APP_URL (callback), SSO_APP_ID. .gitignore now ignores only *.local overrides. Co-Authored-By: Claude Opus 4.8 (1M context) --- .env.development | 8 ++++++++ .env.production | 8 ++++++++ .env.staging | 8 ++++++++ .gitignore | 6 ++---- 4 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 .env.development create mode 100644 .env.production create mode 100644 .env.staging diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..7f661e7 --- /dev/null +++ b/.env.development @@ -0,0 +1,8 @@ +# Mock SSO 服务地址(服务端用于 code 换取用户信息) +SSO_URL="http://localhost:5501" + +# 本应用地址(作为 SSO 回调 app_url) +NEXT_PUBLIC_APP_URL="http://localhost:4000" + +# 注册在 SSO 的应用 ID(app_id) +SSO_APP_ID="app_demo_001" diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..960f826 --- /dev/null +++ b/.env.production @@ -0,0 +1,8 @@ +# Mock SSO 服务地址(集群内 svc 名,按实际部署填写) +SSO_URL="http://sso-mock-svc:5501" + +# 本应用地址(作为 SSO 回调 app_url,按实际部署填写) +NEXT_PUBLIC_APP_URL="" + +# 注册在 SSO 的应用 ID(app_id) +SSO_APP_ID="app_demo_001" diff --git a/.env.staging b/.env.staging new file mode 100644 index 0000000..7f661e7 --- /dev/null +++ b/.env.staging @@ -0,0 +1,8 @@ +# Mock SSO 服务地址(服务端用于 code 换取用户信息) +SSO_URL="http://localhost:5501" + +# 本应用地址(作为 SSO 回调 app_url) +NEXT_PUBLIC_APP_URL="http://localhost:4000" + +# 注册在 SSO 的应用 ID(app_id) +SSO_APP_ID="app_demo_001" diff --git a/.gitignore b/.gitignore index 68801cd..afacf0b 100644 --- a/.gitignore +++ b/.gitignore @@ -28,10 +28,8 @@ yarn-debug.log* yarn-error.log* .pnpm-debug.log* -# env files (never commit env; provide .env.example as a template instead) -.env -.env.* -!.env.example +# env files — committed per project convention (参考 uirefbase);仅忽略本地覆盖文件 +.env*.local # vercel .vercel