Files
sundynix-agentix/deploy/132-app/docker-compose.yml
T
Blizzard ac4fd00e28 fix(deploy): gateway 挂载微信支付证书目录(容器读不到宿主机路径)
证书在 132 宿主机 /home/workspace/wechat-pay-cert,但 gateway 跑在容器里、没挂任何卷,
LoadPrivateKeyWithPath 直接读磁盘 → 路径不存在 → 商户私钥加载失败、微信渠道隐藏。

只读挂进 gateway(只有它碰支付,dispatcher/mcp-* 不用):
  /home/workspace/wechat-pay-cert → /etc/sundynix/wechat-cert (ro)

⚠️ admin「系统配置 → 支付」里填的必须是**容器内路径** /etc/sundynix/wechat-cert/xxx.pem,
填宿主机路径会失败。私钥不进镜像、不进 git。部署时 compose 变更会让 up -d 重建容器生效。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-20 10:19:32 +08:00

86 lines
4.3 KiB
YAML
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.
# sundynix-agentix · 应用机 192.168.100.132
#
# cd deploy/132-app && cp .env.example .env # 填密钥/密码/MinIO 凭据
# docker compose up -d --build # 在 132 本地构建并运行(Gitea 自动部署也走这条)
#
# 说明:
# - 对外只暴露 gateway:3000frp 映射)。gateway 已内嵌 admin 控制台(同源 serve UI+API),
# 无需单独 admin nginx 容器。dispatcher/mcp-go/mcp-py 只走 NATS,无对外端口。
# - 基础设施在 128PG/NATS集群/Redis/Milvus/Neo4j),对象存储在 126MinIO),env 全部指向它们。
# - 构建上下文为仓库根(../..,因 Go 服务 replace ../sundynix-shared)。
# - NATS_STREAM_REPLICAS=3durable 流走 128 三节点集群,有 Raft quorum 容错。
services:
gateway:
build: { context: ../.., dockerfile: sundynix-gateway/Dockerfile }
image: sundynix/gateway:${TAG:-latest}
restart: unless-stopped
environment:
APP_ENV: production
GATEWAY_ADDR: ":8080"
NATS_URL: nats://192.168.100.128:4222,nats://192.168.100.128:4223,nats://192.168.100.128:4224
NATS_STREAM_REPLICAS: "3"
POSTGRES_DSN: postgres://sundynix:${POSTGRES_PASSWORD:?}@192.168.100.128:5432/sundynix?sslmode=disable
REDIS_ADDR: 192.168.100.128:6379
MINIO_ENDPOINT: 192.168.100.126:9000
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY:?}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY:?}
MINIO_BUCKET: ${MINIO_BUCKET:-sundynix-docs}
SUNDYNIX_SECRET_KEY: ${SUNDYNIX_SECRET_KEY:?}
JWT_SECRET: ${JWT_SECRET:?}
ADMIN_USER_IDS: ${ADMIN_USER_IDS:-}
CORS_ALLOW_ORIGIN: ${CORS_ALLOW_ORIGIN:-*}
OTEL_EXPORTER_OTLP_ENDPOINT: http://192.168.100.128:4318
ports: ["3000:8080"] # frp 外网 → 132:3000 → 容器 8080
volumes:
# 微信支付证书(商户私钥 + 微信支付公钥):宿主机 132 的目录只读挂进容器。
# ⚠️ admin「系统配置 → 支付」里填的路径必须是**容器内路径**/etc/sundynix/wechat-cert/...),
# 不是宿主机路径——容器看不到宿主机的 /home/workspace/...。私钥不进镜像、不进 git。
- /home/workspace/wechat-pay-cert:/etc/sundynix/wechat-cert:ro
dispatcher:
build: { context: ../.., dockerfile: sundynix-dispatcher/Dockerfile }
image: sundynix/dispatcher:${TAG:-latest}
restart: unless-stopped
environment:
APP_ENV: production
NATS_URL: nats://192.168.100.128:4222,nats://192.168.100.128:4223,nats://192.168.100.128:4224
NATS_STREAM_REPLICAS: "3"
SUNDYNIX_SECRET_KEY: ${SUNDYNIX_SECRET_KEY:?}
OTEL_EXPORTER_OTLP_ENDPOINT: http://192.168.100.128:4318
DISPATCHER_CONCURRENCY: ${DISPATCHER_CONCURRENCY:-8}
TASK_TOKEN_BUDGET: ${TASK_TOKEN_BUDGET:-200000}
mcp-go:
build: { context: ../.., dockerfile: sundynix-mcp-go/Dockerfile }
image: sundynix/mcp-go:${TAG:-latest}
restart: unless-stopped
environment:
APP_ENV: production
NATS_URL: nats://192.168.100.128:4222,nats://192.168.100.128:4223,nats://192.168.100.128:4224
NATS_STREAM_REPLICAS: "3"
POSTGRES_DSN: postgres://sundynix:${POSTGRES_PASSWORD:?}@192.168.100.128:5432/sundynix?sslmode=disable
REDIS_ADDR: 192.168.100.128:6379
MILVUS_ADDR: 192.168.100.128:19530
NEO4J_URI: neo4j://192.168.100.128:7687
NEO4J_USER: neo4j
NEO4J_PASS: ${NEO4J_PASSWORD:?}
# 报告源/产物 + KB 正文对象存储(本会话新加 blob)——指向 126,勿漏,否则 fallback localhost 连不上。
MINIO_ENDPOINT: 192.168.100.126:9000
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY:?}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY:?}
MINIO_BUCKET: ${MINIO_BUCKET:-sundynix-docs}
SUNDYNIX_SECRET_KEY: ${SUNDYNIX_SECRET_KEY:?}
OTEL_EXPORTER_OTLP_ENDPOINT: http://192.168.100.128:4318
mcp-py:
build: { context: ../../sundynix-mcp-py, dockerfile: Dockerfile }
image: sundynix/mcp-py:${TAG:-latest}
restart: unless-stopped
environment:
NATS_URL: nats://192.168.100.128:4222,nats://192.168.100.128:4223,nats://192.168.100.128:4224
# secure_sandbox(代码隔离执行)需访问宿主 Docker 拉一次性容器。安全敏感:等于把 132 宿主
# Docker 暴露给该服务(可逃逸);不需要代码执行工具可注释掉这两行。mcp-py 无对外端口。
volumes:
- /var/run/docker.sock:/var/run/docker.sock