Files
gongxue-base/.env.example

32 lines
939 B
Plaintext
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.

# 恭学教育 — 生产环境配置
# 复制为 .env 并修改密码
# MySQL 数据库
MYSQL_ROOT_PASSWORD=change-me-to-a-strong-password
# 后端
DB_HOST=127.0.0.1
DB_PORT=3306
DB_USERNAME=root
DB_DATABASE=gongxue
DB_SYNCHRONIZE=false
JWT_SECRET=change-me-to-a-random-string-at-least-32-chars
JWT_EXPIRES_IN=24h
PORT=3000
# ---- AI 模型配置 ----
# AES-256-GCM 加密主密钥,用于加密存储 API Key
# 生产环境必须设置生成方式openssl rand -hex 32
# 格式64 位 hex推荐或 base64 编码后恰好 32 字节
# 示例 hexopenssl rand -hex 32
# 示例 base64openssl rand -base64 32
AI_CONFIG_ENCRYPTION_KEY=
# AI API Key 环境变量回退(可选)
# 若数据库未保存 Key将从该环境变量读取
# 环境变量 Key 不可从页面覆盖或清除
# AI_API_KEY=
# 允许内网地址作为 OPENAI_COMPATIBLE 的 baseUrl仅内网部署使用
# AI_ALLOW_PRIVATE_BASE_URL=true