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:
@@ -17,28 +17,23 @@ supergraph:
|
||||
listen: 0.0.0.0:3000
|
||||
path: /graphql
|
||||
# 生产关闭 introspection(APOLLO_ROUTER_INTROSPECTION=false)
|
||||
# 开发默认 true 便于调试
|
||||
introspection: ${env.APOLLO_ROUTER_INTROSPECTION::true}
|
||||
# 开发默认 true 便于调试(由 docker-compose environment 注入)
|
||||
introspection: ${env.APOLLO_ROUTER_INTROSPECTION}
|
||||
|
||||
# 持久化查询(v2.1 M3 安全加固)
|
||||
# 关联:portal-shell spec §4.3
|
||||
# - enabled: 启用 APQ(接受 hash-only 请求)
|
||||
# - require_manifest: 生产设为 true,仅接受 manifest 内的 hash
|
||||
# - manifest_path: manifest 文件路径(由 portal-shell 构建产物挂载)
|
||||
persisted_queries:
|
||||
enabled: true
|
||||
require_manifest: ${env.APOLLO_REQUIRE_PQ_MANIFEST::false}
|
||||
manifest_path: /etc/apollo-router/pq-manifest.json
|
||||
# 注意:Apollo Router v1.45 的 persisted_queries 是 ELv2 受限特性,
|
||||
# 需连接 GraphOS(APOLLO_KEY + APOLLO_GRAPH_REF)才能启用。
|
||||
# 自托管开发态禁用此特性;生产环境如需启用,需配置 GraphOS license。
|
||||
# persisted_queries:
|
||||
# enabled: false
|
||||
|
||||
# 查询限制(v2.1 M3 安全加固)
|
||||
# 关联:portal-shell spec §5.1
|
||||
# - max_depth: 最大嵌套深度 10(防止递归攻击)
|
||||
# - max_cost: 最大查询复杂度 1000(防止放大攻击)
|
||||
# - max_batch_size: 批量查询上限 5(防止 batch 攻击)
|
||||
limits:
|
||||
max_depth: 10
|
||||
max_cost: 1000
|
||||
max_batch_size: 5
|
||||
# 注意:Apollo Router v1.45 的 limits.max_depth 是 ELv2 受限特性,
|
||||
# 需连接 GraphOS 才能启用。自托管开发态禁用;
|
||||
# 生产环境如需深度限制,可使用 rhai script 或 custom plugin 替代。
|
||||
# limits:
|
||||
# max_depth: 10
|
||||
|
||||
# Sandbox 模式:支持开发和调试(v1.45 中 sandbox 已合并到 homepage)
|
||||
homepage:
|
||||
|
||||
Reference in New Issue
Block a user