From 981f79aca9594f4e275afc7d3340059c1f85db6f Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Tue, 16 Jun 2026 13:43:47 +0800 Subject: [PATCH] =?UTF-8?q?chore(dev):=20run-local.sh=20=E5=8F=AF=E9=80=89?= =?UTF-8?q?=20source=20dev/.local/smtp.env=20=E6=94=AF=E6=8C=81=E7=9C=9F?= =?UTF-8?q?=E5=8F=91=E9=82=AE=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 存在 smtp.env 时设 SMTP_* → 后端真发邮件(如 Ethereal 临时账户); 否则 LogMailer 打日志。smtp.env 在 dev/.local(gitignore),凭证不进 git。 Co-Authored-By: Claude Sonnet 4.6 --- dev/run-local.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dev/run-local.sh b/dev/run-local.sh index 909461e..362debe 100755 --- a/dev/run-local.sh +++ b/dev/run-local.sh @@ -38,7 +38,10 @@ export JWT_PRIVATE_KEY_PATH="$LOCAL/jwt_private.pem" export JWT_KEY_ID="dev-key-1" export JWT_PUBLIC_KEYS="dev-key-1:$LOCAL/jwt_public.pem" export ADDR=":18080" # 避让本机已占用的 8080 -# 不设 SMTP_* → LogMailer(验证码打日志);不设 GRPC_* → 不启 agent server。 +# 真发邮件:dev/.local/smtp.env 存在则 source(设 SMTP_*)→ 后端用真 SMTP; +# 否则不设 SMTP_* → LogMailer 把验证码打日志。不设 GRPC_* → 不启 agent server。 +# shellcheck disable=SC1091 +[ -f "$LOCAL/smtp.env" ] && . "$LOCAL/smtp.env" # ── 4. 迁移 + seed ─────────────────────────────────────────────────── echo "[run-local] 数据库迁移 ..."