Skip to content

Deployment Guide

zhouning edited this page Mar 22, 2026 · 1 revision

部署指南 / Deployment Guide

中英双语 | Bilingual


中文

Docker Compose 部署

# 开发环境
docker-compose up -d

# 生产环境
docker-compose -f docker-compose.prod.yml up -d

服务组成:app (Chainlit + API) + postgres (PostGIS) + redis (可选)

Kubernetes 部署

11 个清单文件位于 k8s/

kubectl apply -k k8s/

包含:Deployment, Service, ConfigMap, Secret, HPA (自动扩缩), Ingress, NetworkPolicy, PostgreSQL StatefulSet, Namespace

数据库迁移

for f in data_agent/migrations/*.sql; do
  psql -U agent_user -d gis_agent -f "$f"
done

监控

  • Prometheus/metrics 端点,25+ 指标
  • Grafana:导入 grafana/agent_overview.json
  • 健康检查GET /health(K8s liveness/readiness)

SSL/TLS

通过反向代理(nginx/traefik)配置 HTTPS。

备份

pg_dump -U agent_user gis_agent > backup_$(date +%Y%m%d).sql

完整部署文档:deployment-guide.md


English

Docker Compose

# Development
docker-compose up -d

# Production
docker-compose -f docker-compose.prod.yml up -d

Services: app (Chainlit + API) + postgres (PostGIS) + redis (optional)

Kubernetes

11 manifests in k8s/:

kubectl apply -k k8s/

Includes: Deployment, Service, ConfigMap, Secret, HPA, Ingress, NetworkPolicy, PostgreSQL StatefulSet, Namespace

Database Migrations

for f in data_agent/migrations/*.sql; do
  psql -U agent_user -d gis_agent -f "$f"
done

Monitoring

  • Prometheus: /metrics endpoint, 25+ metrics
  • Grafana: Import grafana/agent_overview.json
  • Health: GET /health (K8s liveness/readiness)

SSL/TLS

Configure HTTPS via reverse proxy (nginx/traefik).

Backup

pg_dump -U agent_user gis_agent > backup_$(date +%Y%m%d).sql

Full deployment docs: deployment-guide.md

Clone this wiki locally