Files
life-echo/api/.env.example

58 lines
3.0 KiB
Plaintext
Raw Normal View History

# =============================================================================
# Life Echo API — 环境变量(仅 secrets + bootstrap
2026-03-23 13:21:07 +08:00
#
# 非密钥配置 SSOTconfig/default.toml + config/{APP_ENV}.toml
# 详见 docs/configuration.md
# =============================================================================
# ── Bootstrap ─────────────────────────────────────────────────
APP_ENV=development
DATABASE_URL=postgresql://postgres:postgres@localhost:48291/life_echo
REDIS_URL=redis://localhost:48307/0
# 可选Redis 密码(应用会自动注入 URL本地 dev 通常留空)
# REDIS_PASSWORD=
# 可选:覆盖 Celery broker/backend URL默认自动使用 REDIS_URL 的 DB+1
# CELERY_REDIS_URL=redis://localhost:48307/1
# Flowerdocker-compose.yml 生产栈,仅 localhost:5555
# FLOWER_USER=admin
# FLOWER_PASSWORD=changeme
# ── Auth secret ───────────────────────────────────────────────
# 生产/staging 务必openssl rand -hex 32
SECRET_KEY=replace_with_a_strong_random_secret
merge dark mode and google OAuth (#35) * feat(api): implement Google OAuth login and user management - Added Google OpenID Connect login functionality, allowing users to authenticate using their Google accounts. - Created new endpoints for Google login, including user registration and linking existing accounts. - Introduced Google token verification logic and error handling for authentication failures. - Updated environment configuration to include Google OAuth client IDs and verification settings. - Enhanced user model to support OpenID and linked Google accounts. This feature improves user experience by enabling seamless sign-in with Google, while maintaining security and integrity of user data. * fix(auth): wire staging Google token verifier * chore(deps): update expo to version 55.0.6 and adjust @expo/env dependency in pnpm-lock.yaml * chore(deps): update Babel dependencies to version 7.29.7 in package-lock.json * feat(auth): enhance phone login for China users - Updated phone login functionality to support only mainland China (+86) mobile numbers. - Added user prompts and descriptions for phone login, including confirmation and cancellation options. - Adjusted translations for both English and Chinese to reflect the new phone login requirements. - Updated Google OAuth client IDs in configuration files for production and staging environments. * chore(deps): add peer flag to use-sync-external-store in package-lock.json * chore(deps): add @emnapi/core and @emnapi/runtime to package-lock.json * fix(app-expo): align Android native dependencies * fix(app-expo): normalize lockfile for npm 10 * fix(config): update environment variable handling to use static access - Introduced a static mapping for public environment variables to ensure proper access during the release bundle. - Updated the `requirePublicEnv` and `optionalPublicEnv` functions to reference the new `PUBLIC_ENV` object instead of directly accessing `process.env`. - Added comments to clarify the necessity of static access for certain environment variables. * feat(app-expo): dark mode, FAQ i18n, eval ASR, and theme cleanup (#34) * feat(app-expo): dark mode, FAQ i18n, version CI, and theme cleanup Implement light/dark scene colors across chat, reading, and headers; remove default/brand theme picker and ThemeVariablesProvider. Localize FAQ in-app, fix dark-mode text visibility, and remove the unused /api/faqs endpoint. Align About/version with Expo config and inject APP_VERSION in CI builds. Also includes phone E164 auth/SMS updates, eval ASR page, and related API work. * revert: remove phone E.164 changes from dark-mode branch These auth/SMS internationalization updates were accidentally bundled into the dark-mode commit; restore 11-digit CN phone flow and drop related API, migration, and Expo UI work from this branch. * fix: address PR review issues for dark mode and eval ASR Use light foreground colors for sepia reading in dark mode, fix chat send button contrast, stream-limit eval ASR uploads, restore LiveTester phone validation, and remove unused AudioSegmenter code. * fix(app-expo): improve chat send button contrast in light and dark mode Add dedicated send button colors (accent fill in dark, primary fill in light), use RNText to avoid NativeWind overrides, and restore dark labels in light mode for readable composer actions. --------- Co-authored-by: Kevin <kevin@brighteng.org> --------- Co-authored-by: penghanyuan <penghanyuan@gmail.com> Co-authored-by: Kevin <kevin@brighteng.org>
2026-06-09 11:14:36 +08:00
# Google 登录 client IDs 配在 config/*.toml 的 deploy.google_oauth_client_ids
# 只填写 OAuth client ID非密钥多个用英文逗号分隔。
# 可选:海外 Google token verifier URL / timeout 配在 config/*.toml
# 这里只填 API 与 verifier 共用的 bearer 密钥。
# GOOGLE_TOKEN_VERIFIER_SECRET=replace_with_shared_random_secret
# ── LLM / Embedding 密钥 ─────────────────────────────────────
DEEPSEEK_API_KEY=your_deepseek_api_key
ZHIPU_API_KEY=your_zhipu_api_key
# ── 腾讯云凭证SMS / ASR / TTS / COS 共用)──────────────────
TENCENT_SECRET_ID=your_tencent_secret_id
TENCENT_SECRET_KEY=your_tencent_secret_key
# ASR 极速版必填API 密钥管理页 AppId与 SecretId 同页)
TENCENT_APP_ID=your_tencent_app_id
# ── WeChat Pay 密钥 ───────────────────────────────────────────
WECHAT_PAY_API_V3_KEY=your_wechat_api_v3_key
# WECHAT_PAY_PRIVATE_KEY= # 或使用 WECHAT_PAY_PRIVATE_KEY_PATH见 config/*.toml deploy
# ── Alipay 密钥(未接入可留空)────────────────────────────────
ALIPAY_PRIVATE_KEY=
ALIPAY_PUBLIC_KEY=
# ── Liblib 密钥memoir image见 config deploy.memoir_image_enabled────
LIBLIB_ACCESS_KEY=your_liblib_access_key
LIBLIB_SECRET_KEY=your_liblib_secret_key
# ── Internal evaluation API可选────────────────────────────
INTERNAL_EVAL_API_KEY=
# ── Docker Compose 端口(非 Settings见 docker-compose.yml──
# LIFE_ECHO_API_HOST_PORT=8000