feat(infra): p6 hardening - observability and deploy compose

- 5 NestJS services add /metrics endpoint via app.getHttpAdapter()
- prometheus.yml scales to 8 services with rule_files and alertmanager
- monitoring compose replaces blackbox with Loki+Promtail
- Grafana datasource adds Loki
- docker-compose.deploy.yml scales to 11 services
- deploy.env.example completes Neo4j/ES/ClickHouse/LLM vars
- teacher-bff adds health.controller
- CI removes continue-on-error on lint step
- teacher-portal lint script changed to eslint src
This commit is contained in:
SpecialX
2026-07-09 10:21:06 +08:00
parent 3ca654619f
commit 566060fade
21 changed files with 554 additions and 59 deletions

View File

@@ -27,12 +27,29 @@ JWT_AUDIENCE=next-edu-cloud
API_GATEWAY_PORT=8080
TEACHER_PORTAL_PORT=3000
# ============ KafkaP3 阶段启用P1 留空============
# ============ KafkaP3+ 启用,留空则 Outbox publisher 持续重试============
KAFKA_BROKERS=
# ============ 可观测性P6 阶段启用P1 留空============
OTEL_EXPORTER_OTLP_ENDPOINT=
# ============ 可观测性P6 启用============
# OTLP collector 端点,留空则服务跳过 trace 上报
OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
LOG_LEVEL=info
# ============ 镜像 tag由 CI 注入,手动部署时可改============
# IMAGE_TAG=latest ← 默认 latestCI 通过 export IMAGE_TAG 覆盖
# ============ Neo4jcontent 服务,留空则降级模式============
NEO4J_URL=
NEO4J_PASSWORD=
# ============ Elasticsearchmsg 服务,留空则降级模式)============
ES_URL=
# ============ ClickHousedata-ana 服务,留空则降级模式)============
CLICKHOUSE_HOST=
CLICKHOUSE_PORT=8123
CLICKHOUSE_DATABASE=edu_analytics
CLICKHOUSE_USER=
CLICKHOUSE_PASSWORD=
# ============ LLM 配置ai 服务,留空则降级模式)============
OPENAI_API_KEY=
OPENAI_BASE_URL=https://api.openai.com/v1
ANTHROPIC_API_KEY=