Files
dudu/server/run-dev.sh
T
wangjia 8266c575aa
ci / server (push) Failing after 10s
ci / design-system (push) Failing after 10s
fix(auth): 固定验证码改为显式 AUTH_EMAIL_DEV_CODE 环境开关(安全评审反馈)
不再从 mailer 运行时类型推导认证材料:固定码仅当显式设置
AUTH_EMAIL_DEV_CODE 时生效(run-dev.sh 设 888888,生产部署不经
该脚本即为随机码),设置时启动打印醒目告警。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-11 20:42:11 +08:00

16 lines
762 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/sh
# 本地起后端(在 server/ 目录下运行):
# DashScope Key 从 Bitwarden 取(条目名 dashscope-api-key),有则真实识别,无则自动落 mock provider。
# 前置:rbw unlock 已解锁;docker compose up -d 已起 pg/redis。
set -e
# 开发期固定邮箱验证码(仅本脚本设置;生产部署不经此脚本,不会带上)
export AUTH_EMAIL_DEV_CODE=888888
if rbw get dashscope-api-key >/dev/null 2>&1; then
echo "[run-dev] 使用真实 gummy provider"
rbw get dashscope-api-key | { read -r K; ASR_PROVIDER=gummy DASHSCOPE_API_KEY="$K" exec go run ./cmd/server; }
else
echo "[run-dev] 未取到 dashscope-api-keyrbw 未解锁或条目不存在),使用 mock provider"
exec go run ./cmd/server
fi