chore(infra): docker dev-apps stack + apollo-router v1.45 compat

- 新增 docker-compose.dev-apps.yml:7 个应用服务容器化
  (iam/classes/core-edu/content/msg/push-gateway/api-gateway)
  + apollo-router override
- 新增 apollo-router dev-apps-entrypoint.sh / dev-apps-supergraph.yaml
  仅等待 5 个子图(iam/core-edu/content/msg/config-service)
  避免等待未启动的 ai/data-ana
- router.yaml:移除 v1.45 不兼容键
  (require_manifest/manifest_path/max_cost/max_batch_size)
  移除 ELv2 受限特性(persisted_queries/limits.max_depth)
  自托管无 GraphOS license
- docker-compose.yml:config-service 添加 NODE_ENV=production
  修复 pino-pretty devDep 误用
  apollo-router 添加 APOLLO_PERSISTED_QUERIES env
- services/{classes,core-edu,content,config-service}/Dockerfile
  重写为 repo 根 context + shared-ts/shared-proto 工作区依赖
  + --ignore-scripts
  修复 ERR_PNPM_WORKSPACE_PKG_NOT_FOUND 与 ERR_PNPM_IGNORED_BUILDS
- api-gateway healthcheck:wget --spider 改为 wget -O /dev/null
  修复 busybox 对 200+body 误报 exit 8
This commit is contained in:
SpecialX
2026-07-22 11:35:02 +08:00
parent f586a0b19e
commit 682f323bad
10 changed files with 603 additions and 71 deletions

View File

@@ -306,7 +306,9 @@ services:
REDIS_URL: redis://edu-redis:6379
KAFKA_BROKERS: kafka:29092
ROUTER_AUTH_SECRET: ${ROUTER_AUTH_SECRET:-dev-router-secret}
DEV_MODE: ${DEV_MODE:-false}
# DEV_MODE=true 让子图 middleware 跳过鉴权,允许 apollo-router rover introspect 子图
DEV_MODE: "true"
NODE_ENV: production
PORT: "3011"
GRPC_PORT: "50059"
ports:
@@ -334,6 +336,8 @@ services:
# v2.1 M3 安全加固开关(生产设为 true开发默认 false
APOLLO_REQUIRE_PQ_MANIFEST: ${APOLLO_REQUIRE_PQ_MANIFEST:-false}
APOLLO_ROUTER_INTROSPECTION: ${APOLLO_ROUTER_INTROSPECTION:-true}
# Apollo Router v1.45 persisted_queries.enabled 需要布尔值true/false
APOLLO_PERSISTED_QUERIES: ${APOLLO_PERSISTED_QUERIES:-true}
ports:
- "3000:3000"
- "8088:8088"
@@ -365,7 +369,8 @@ services:
APOLLO_ROUTER_URL: http://apollo-router:3000/graphql
NEXT_PUBLIC_API_GATEWAY_URL: http://api-gateway:8080
NEXT_PUBLIC_REALTIME_GATEWAY_URL: http://realtime-gateway:8081
NEXT_PUBLIC_DEV_MODE: "true"
# P0-5生产 profile 必须 false启动校验见 src/instrumentation.ts
NEXT_PUBLIC_DEV_MODE: "false"
ports:
- "4010:4010"
depends_on: