chore(deploy): 三机部署 compose 拆分 + NATS 3 节点集群

126=MinIO(已部署)、128=基础设施、132=应用。

- deploy/128-infra:NATS 3 节点集群(独立卷+cluster routes,暴露4222/4223/4224)+PG/Redis/
  Milvus(自带etcd+自带内部minio,不复用126)/Neo4j/Jaeger;端口对局域网暴露、卷持久化。
- deploy/nats-cluster/nats{1,2,3}.conf:max_payload 一致 + jetstream + cluster。
- deploy/132-app:仅 gateway(3000:8080)+dispatcher+mcp-go+mcp-py,无 admin nginx;env 指向
  126/128;mcp-go 补齐 MINIO env(本会话 blob 遗漏);NATS_STREAM_REPLICAS=3;.env.example 模板。
- docker-compose.prod.yml(单机):删 admin 服务(已内嵌)、mcp-go 补 MINIO env。
- 三个 compose 均 docker compose config 校验通过;.env 已 gitignore、.env.example 可提交。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Blizzard
2026-07-18 14:45:24 +08:00
parent 2e02a12260
commit 6b45adbbd2
8 changed files with 313 additions and 8 deletions
+21
View File
@@ -0,0 +1,21 @@
# NATS 集群节点 1 / 3JetStream Raft)。单机多节点:三容器同宿主(128),各自独立卷。
# 三节点的 max_payload 必须一致;server_name 唯一;routes 指向另外两节点的 cluster 端口。
server_name: nats1
port: 4222
http_port: 8222
max_payload: 8MB
jetstream {
store_dir: "/data/jetstream"
max_memory_store: 1GB
max_file_store: 10GB
}
cluster {
name: sundynix-cluster
listen: 0.0.0.0:6222
routes: [
nats-route://nats2:6222
nats-route://nats3:6222
]
}
+20
View File
@@ -0,0 +1,20 @@
# NATS 集群节点 2 / 3JetStream Raft)。max_payload 与其余节点一致;routes 指向 nats1/nats3。
server_name: nats2
port: 4222
http_port: 8222
max_payload: 8MB
jetstream {
store_dir: "/data/jetstream"
max_memory_store: 1GB
max_file_store: 10GB
}
cluster {
name: sundynix-cluster
listen: 0.0.0.0:6222
routes: [
nats-route://nats1:6222
nats-route://nats3:6222
]
}
+20
View File
@@ -0,0 +1,20 @@
# NATS 集群节点 3 / 3JetStream Raft)。max_payload 与其余节点一致;routes 指向 nats1/nats2。
server_name: nats3
port: 4222
http_port: 8222
max_payload: 8MB
jetstream {
store_dir: "/data/jetstream"
max_memory_store: 1GB
max_file_store: 10GB
}
cluster {
name: sundynix-cluster
listen: 0.0.0.0:6222
routes: [
nats-route://nats1:6222
nats-route://nats2:6222
]
}