查 Graphiti Neo4j → 标准 {nodes,edges} 供 graph-viewer 组件渲染; 六组group_id;
含部署配置(unit/nginx)与 viz.env.example(密钥走⟨secdb⟩不入库); .gitignore 排除 env/vendor/备份
49 lines
2.1 KiB
Plaintext
49 lines
2.1 KiB
Plaintext
# Graphiti 时序知识图谱可视化 · 公网入口
|
|
# https://graphiti.apescale.com:1030 -> 内网443 -> 本块 -> 127.0.0.1:8096 (FastAPI graphiti-viz)
|
|
# 证书 graphiti.apescale.com (acme.sh manual DNS, EC-256, 到期 2027-01-04)
|
|
# A 记录显式覆盖通配符 * -> 222.128.20.101 (RecordID 50704678)
|
|
# basic auth realm Graphiti; 口令登记于 dsh_secdb
|
|
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
server_name graphiti.apescale.com;
|
|
|
|
ssl_certificate /home/mag/certs/graphiti-apescale/graphiti.apescale.com.crt;
|
|
ssl_certificate_key /home/mag/certs/graphiti-apescale/graphiti.apescale.com.key;
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_ciphers HIGH:!aNULL:!MD5;
|
|
client_max_body_size 10m;
|
|
|
|
|
|
# Safari 修复 (2026-10-07): 入口页与编译产物禁缓存 —— 否则 Safari 会拿旧的
|
|
# babel 版 index.html / app.jsx 强缓存, 改完不生效。
|
|
# 库文件(vendor/)内容固定、文件名带版本号语义, 给长缓存以加快首屏。
|
|
location ~* \.(html|jsx)$ {
|
|
add_header Cache-Control "no-store, no-cache, must-revalidate" always;
|
|
proxy_pass http://127.0.0.1:8096;
|
|
}
|
|
location ~* ^/(app\.compiled\.js|compat-shim\.js|favicon\.(svg|ico))$ {
|
|
add_header Cache-Control "no-store, no-cache, must-revalidate" always;
|
|
proxy_pass http://127.0.0.1:8096;
|
|
}
|
|
location ~* ^/vendor/.*\.js$ {
|
|
add_header Cache-Control "public, max-age=31536000, immutable" always;
|
|
proxy_pass http://127.0.0.1:8096;
|
|
}
|
|
location / {
|
|
proxy_pass http://127.0.0.1:8096;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
# WebSocket 余量 (force-graph 无 ws, 留扩展空间)
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
proxy_buffering off;
|
|
proxy_cache off;
|
|
proxy_read_timeout 600s;
|
|
proxy_send_timeout 600s;
|
|
}
|
|
}
|