Files
photo-live/.env.example
T
浅念 3d6e9ce175 feat(ov): ov schema, entry skeleton and compose profile
P2 Task 2 ov 数据层:
- compose ov profile:mysql-ov(mysql:8.4,127.0.0.1:3309,库级
  utf8mb4_0900_bin)+ redis-ov(6381),cn 侧默认 up 不受影响
  (3307/3308 已被其它本机项目占用,端口决策 3309)
- @photo/db-ov:9 表 schema(albums_ov/photos_ov 副本、sync_inbox/
  sync_state 同步账本(水位行同表标志位)、like_batches/album_stats/
  visit_sessions/visit_requests 互动域、outbox_stat_events 回传队列);
  迁移 20260918060102_init_ov 走固化校对手决流程,information_schema
  复核全部业务表/列 utf8mb4_0900_bin(_prisma_migrations 同 cn 先例
  保持 unicode_ci)
- generator 独立 output(包内 generated/):pnpm 将两包 @prisma/client
  提升为同一 store 实例,默认 .prisma/client 输出会被双 schema 互相
  覆盖,ov 客户端独立产出经 src/index.ts 转出口
- ov 入口骨架:main-ov.ts(PORT_OV 默认 8081)+ app-ov.module.ts
  (仅管线骨架 + /v1/health,feature modules 后续任务装配);logger
  装配选项抽取至 shared/logger-options.ts 供 cn/ov 双入口共用(行为
  不变,P1 套件守护)
- test/reset-ov.ts:ov 库 truncate-if-exists 隔离工具(无 MinIO 清理)
- 根脚本:db:generate 双库齐跑,新增 db-ov:migrate/db-ov:generate/dev:ov

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-18 14:11:41 +08:00

34 lines
1.3 KiB
Bash
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.
DATABASE_URL_CN=mysql://root:root@127.0.0.1:3306/photo_cn?connection_limit=10
REDIS_URL_CN=redis://127.0.0.1:6379
S3_ENDPOINT=http://127.0.0.1:9000
S3_REGION=us-east-1
S3_ACCESS_KEY=photo-dev
S3_SECRET_KEY=photo-dev-secret
S3_BUCKET=photo-dev
SIGNED_URL_TTL_SECONDS=900
AUTH_SESSION_TTL_SECONDS=2592000
UPLOAD_MAX_BYTES=52428800
PORT=8080
CORS_ORIGINS=http://localhost:5175,http://localhost:5176
LOG_LEVEL=info
ADMIN_ACCOUNT=admin
ADMIN_PASSWORD=admin-secret-change-me
# ── P2 双地域仿真(ov 域)──
# 本任务(Task 1)即被读取的键:内部同步 HMAC 密钥与 ov 双库连接。
SYNC_INTERNAL_KEY=dev-sync-secret-change-me
DATABASE_URL_OV=mysql://root:root@127.0.0.1:3309/photo_ov?connection_limit=10
REDIS_URL_OV=redis://127.0.0.1:6381
# P2 Task 2:ov 入口监听端口(main-ov.ts 读取;与 cn PORT=8080 同机双入口)。
PORT_OV=8081
# 以下为 P2 决策初值(D07/D11)的 env 覆盖键:默认值见
# packages/contracts/src/constants.ts(HEARTBEAT_MS 见 src/realtime.ts),
# 此处登记供运维可见与调整;代码读取在 Task 3+ 落地(当前为前瞻登记)。
SYNC_BATCH_SIZE=100
SYNC_PUSH_INTERVAL_MS=2000
SYNC_RECONCILE_INTERVAL_MS=300000
STAT_RETURN_INTERVAL_MS=60000
VISIT_WINDOW_MINUTES=30
LIKE_BATCH_WINDOW_HOURS=24
VISIT_REQUEST_TTL_MINUTES=35