新增: - nginx/nginx.conf: TLS 1.2/1.3 终端 + HSTS/CSP 安全头 + SSE 长连接 + 50M 上传限制 - prometheus/prometheus.yml: HMS/PostgreSQL/Redis/Nginx 四指标源 - prometheus/alerts.yml: 4 组告警规则(系统/应用/数据库/Redis),含 5xx 错误率 + 内存 + 连接数 - restore.sh: 备份恢复脚本(支持加密备份解密恢复) 改进: - backup.sh: 新增 BACKUP_PASSPHRASE 加密(AES-256-CBC)+ 完整性校验 + 恢复指引 - docker-compose.production.yml: 添加 Nginx/Prometheus/Grafana/uploads-backup 容器 - docker-compose.yml: Redis 添加 --appendonly yes 持久化 - .env.production.example: 添加 DevOps 相关环境变量模板
33 lines
642 B
YAML
33 lines
642 B
YAML
global:
|
|
scrape_interval: 15s
|
|
evaluation_interval: 15s
|
|
|
|
rule_files:
|
|
- "alerts.yml"
|
|
|
|
scrape_configs:
|
|
- job_name: "hms"
|
|
metrics_path: /metrics
|
|
static_configs:
|
|
- targets: ["app:9090"]
|
|
labels:
|
|
service: "hms-server"
|
|
|
|
- job_name: "postgres"
|
|
static_configs:
|
|
- targets: ["postgres-exporter:9187"]
|
|
labels:
|
|
service: "postgresql"
|
|
|
|
- job_name: "redis"
|
|
static_configs:
|
|
- targets: ["redis-exporter:9121"]
|
|
labels:
|
|
service: "redis"
|
|
|
|
- job_name: "nginx"
|
|
static_configs:
|
|
- targets: ["nginx-exporter:9113"]
|
|
labels:
|
|
service: "nginx"
|