first commit

This commit is contained in:
2026-04-23 09:58:47 +08:00
commit 448e078d99
49 changed files with 5188 additions and 0 deletions

63
config/nginx.conf Normal file
View File

@@ -0,0 +1,63 @@
upstream compliance_backend {
server compliance-backend:8000;
keepalive 32;
}
# 文件上传大小限制法规PDF可能较大
client_max_body_size 100M;
server {
listen 80;
server_name _;
# 访问日志
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
# 超时配置LLM推理可能较慢
proxy_connect_timeout 60s;
proxy_send_timeout 300s;
proxy_read_timeout 300s;
# 通用代理头
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Connection "";
# ── 知识库接口 ─────────────────────────────
location /api/kb/ {
proxy_pass http://compliance_backend/api/kb/;
}
# ── 合规审查接口 ───────────────────────────
location /api/compliance/ {
proxy_pass http://compliance_backend/api/compliance/;
}
# ── 法规监控接口 ───────────────────────────
location /api/regulation/ {
proxy_pass http://compliance_backend/api/regulation/;
}
# ── 健康检查 ───────────────────────────────
location /health {
proxy_pass http://compliance_backend/health;
}
# ── API 文档(开发环境)────────────────────
location /docs {
proxy_pass http://compliance_backend/docs;
}
location /openapi.json {
proxy_pass http://compliance_backend/openapi.json;
}
# ── 根路径 ─────────────────────────────────
location / {
proxy_pass http://compliance_backend/;
}
}

22
config/prometheus.yml Normal file
View File

@@ -0,0 +1,22 @@
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: "compliance-backend"
static_configs:
- targets: ["compliance-backend:8000"]
metrics_path: /metrics
- job_name: "milvus"
static_configs:
- targets: ["milvus:9091"]
metrics_path: /metrics
- job_name: "redis"
static_configs:
- targets: ["redis:6379"]
- job_name: "postgres"
static_configs:
- targets: ["postgres:5432"]