From 0a9ccaa282a4a2df5355834dc0028da7f288a316 Mon Sep 17 00:00:00 2001 From: zhangheng Date: Mon, 6 Jul 2026 18:44:28 +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: only NEXT_PUBLIC_BASE_PATH and NEXT_PUBLIC_SHARED_API_PATH (basis backend). .gitignore now ignores only *.local overrides. Co-Authored-By: Claude Opus 4.8 (1M context) --- .env.development | 5 +++++ .env.production | 5 +++++ .env.staging | 5 +++++ .gitignore | 6 ++---- 4 files changed, 17 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..b3e53c5 --- /dev/null +++ b/.env.development @@ -0,0 +1,5 @@ +# base url(部署子路径,无则留空) +NEXT_PUBLIC_BASE_PATH="" + +# 公共服务接口地址(后端 basis 服务:登录 / 验证码 / 租户列表都走这里) +NEXT_PUBLIC_SHARED_API_PATH="http://172.16.115.31:6610/" diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..2eeb3a3 --- /dev/null +++ b/.env.production @@ -0,0 +1,5 @@ +# base url(部署子路径,无则留空) +NEXT_PUBLIC_BASE_PATH="" + +# 公共服务接口地址(后端 basis 服务,集群内 svc 名,与 uirefbase 生产一致) +NEXT_PUBLIC_SHARED_API_PATH="http://basis-app-svc:6610" diff --git a/.env.staging b/.env.staging new file mode 100644 index 0000000..b3e53c5 --- /dev/null +++ b/.env.staging @@ -0,0 +1,5 @@ +# base url(部署子路径,无则留空) +NEXT_PUBLIC_BASE_PATH="" + +# 公共服务接口地址(后端 basis 服务:登录 / 验证码 / 租户列表都走这里) +NEXT_PUBLIC_SHARED_API_PATH="http://172.16.115.31:6610/" 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