Files
ipass__ipass/deploy/compose.yml
T
admin 401f9be351 feat(llm): token 计量 + 对话审计日志(10GiB 容量触发式清理)
- llm_usage.rs: body filter 旁路(FFI 注册 top_body_filter,无需额外 C 模块),
  透传 SSE 的同时抓尾部 usage chunk(OpenAI stream_options.include_usage / Anthropic message_delta),
  解析 prompt/completion tokens 写 shm utt:/utms: 键
- llm_audit.rs: log 阶段把请求体临时文件复制进审计目录(audit/ = data 兄弟目录),
  meta.jsonl 记 user/slot/status/token;10 GiB 容量阈值触发式清理,按日期目录从最旧删起
- conf/nginx.conf: LLM location 去掉 proxy_request_buffering off(它管请求体方向、
  与 SSE 无关且与 client_body_in_file_only 互斥),SSE 流式由 proxy_buffering off 保障
- stats/api: 用量接口增加 tokens 维度(today/total per user per slot)
- ipass-agent.py: 容器重建时自动挂审计卷(宿主 audit/ = data 兄弟目录,自动建目录)
- update-agent-face.sh: 控制面自更新脚本(.11 上一行命令完成下载/备份/校验/重启/自检)
- tests: LLM 117/117(+6: 审计 4 + token 2)、网关 90/90,共 207 全绿
2026-09-12 17:59:34 +08:00

26 lines
1.0 KiB
YAML
Raw Permalink 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.
# iPass 山海关 生产部署(192.168.1.11)
#
# 前置:
# docker load -i ipass-gateway-2.0.0.tar.gz
# mkdir -p /opt/ipass && tar -xzf ipass-data-2.0.0.tar.gz -C /opt/ipass
# chown -R 65534:65534 /opt/ipass/data # 容器 worker 是 nobody(uid 65534),必须可写
#
# 启动:
# docker compose -f compose.yml up -d
#
# 数据持久化在宿主机 /opt/ipass/data,容器随便删重建,状态不丢。
# 审计日志同理挂 /opt/ipass/audit(LLM 对话审计,docs/llm/AUDIT_LOG.md):
# mkdir -p /opt/ipass/audit && chown 65534:65534 /opt/ipass/audit
# 升级镜像:load 新 tar 后 `docker compose -f compose.yml up -d --force-recreate`。
services:
gateway:
image: ipass-gateway:2.0.0
container_name: ipass-gateway
ports:
- "88:18098" # 路由器 88 → .11:88;管理 mdm / LLM lm / 企业 *.dm 三域名同端口
# - "80:80" # 如需 *.yourdomain.com 明文转发再放开
volumes:
- /opt/ipass/data:/usr/local/nginx/data
- /opt/ipass/audit:/usr/local/nginx/audit
restart: always