- deploy temporal server (postgresql + auto-setup + ui) in docker-compose - new temporal/ module: workflow + activities + worker manager - convert lesson plan 4-step orchestration to temporal workflow - activities wrap existing analyze/recommend/generate/prepare_review steps - worker injects failover_chain/content_client/data_ana_client via module globals - start() uses temporal client.start_workflow, falls back to asyncio in dev - register temporal ports 7233/8085 in port-allocation Implements M6.5 of v2.1 migration plan (ADR-030).
63 lines
2.5 KiB
Bash
63 lines
2.5 KiB
Bash
# Edu 平台密钥示例环境变量文件
|
||
# ============================================================
|
||
# 警告:本文件仅作示例,禁止包含真实密钥。
|
||
# 生产环境请通过 K8s Secret / External Secrets / Vault 注入。
|
||
# 复制为 .env 后用真实值替换所有 <placeholder>。
|
||
|
||
# ---------- MySQL ----------
|
||
# 用途:MySQL root 用户密码,用于初始化与备份/恢复
|
||
# 最小长度:32 字符
|
||
# 复杂度:含大小写字母 + 数字 + 特殊符号
|
||
MYSQL_ROOT_PASSWORD=<replace-with-32-char-strong-password>
|
||
|
||
# ---------- JWT ----------
|
||
# 用途:JWT Access Token 签名密钥(HS256)
|
||
# 最小长度:64 字符(建议使用 openssl rand -base64 48 生成)
|
||
# 注意:旋转后所有已签发的 Access Token 立即失效
|
||
JWT_SECRET=<replace-with-64-char-jwt-signing-secret>
|
||
|
||
# 用途:JWT Refresh Token 签名密钥(HS256)
|
||
# 最小长度:64 字符
|
||
# 注意:与 JWT_SECRET 必须不同;旋转后所有用户需重新登录
|
||
JWT_REFRESH_SECRET=<replace-with-64-char-refresh-signing-secret>
|
||
|
||
# ---------- Kafka ----------
|
||
# 用途:Kafka SASL/PLAIN 认证密码
|
||
# 最小长度:24 字符
|
||
KAFKA_SASL_PASSWORD=<replace-with-24-char-kafka-password>
|
||
|
||
# ---------- Elasticsearch ----------
|
||
# 用途:Elasticsearch 内置 elastic 用户密码
|
||
# 最小长度:24 字符
|
||
ES_PASSWORD=<replace-with-24-char-es-password>
|
||
|
||
# ---------- Neo4j ----------
|
||
# 用途:Neo4j 数据库管理员密码
|
||
# 最小长度:24 字符
|
||
NEO4J_PASSWORD=<replace-with-24-char-neo4j-password>
|
||
|
||
# ---------- Redis ----------
|
||
# 用途:Redis ACL 默认用户密码
|
||
# 最小长度:24 字符
|
||
# 注意:生产环境建议启用 ACL,按用户分配最小权限
|
||
REDIS_PASSWORD=<replace-with-24-char-redis-password>
|
||
|
||
# ---------- 应用层加密 ----------
|
||
# 用途:应用层字段级加密密钥(AES-256-GCM)
|
||
# 最小长度:32 字节(base64 编码后约 44 字符)
|
||
# 生成:openssl rand -base64 32
|
||
# 注意:旋转前需先解密所有已加密字段,旋转后重新加密
|
||
ENCRYPTION_KEY=<replace-with-base64-32-byte-aes-key>
|
||
|
||
# ---------- Apollo Router 信任凭证 ----------
|
||
# 用途:Router → 子图的共享密钥,子图 RouterAuthGuard 校验此 Header
|
||
# 最小长度:32 字符
|
||
# 生成:openssl rand -hex 32
|
||
# 注意:Router 和所有子图必须使用相同的密钥
|
||
ROUTER_AUTH_SECRET=<replace-with-32-char-router-auth-secret>
|
||
|
||
# ---------- Temporal ----------
|
||
# 用途:Temporal PostgreSQL 存储密码
|
||
# 最小长度:24 字符
|
||
TEMPORAL_POSTGRES_PASSWORD=<replace-with-24-char-temporal-password>
|