# Docker应用配置管理
# 管理所有服务器上的Docker应用

# 服务器列表
servers:
  - name: "macmini"
    hostname: "macmini"
    description: "Mac Mini M4 - 主控制节点"
    docker_root: "/Users/weishen/docker"
    
  - name: "ubuntu1"
    hostname: "ubuntu1"
    description: "Ubuntu服务器1 - 应用服务器"
    docker_root: "/home/shenwei/docker"
    
  - name: "ubuntu2"
    hostname: "ubuntu2"
    description: "Ubuntu服务器2 - 监控服务器"
    docker_root: "/home/shenwei/docker"
    
  - name: "NAS"
    hostname: "NAS"
    description: "NAS服务器 - 媒体和存储"
    docker_root: "/volume1/docker"

# Docker应用列表
applications:
  # macmini服务器上的应用
  - name: "vaultwarden"
    server: "macmini"
    directory: "/Users/weishen/docker/vaultwarden"
    description: "密码管理器"
    status: "active"
    category: "security"
    ports: ["8080:80"]
    
  - name: "portainer-mac"
    server: "macmini"
    directory: "/Users/weishen/docker/portainer"
    description: "Docker容器管理"
    status: "active"
    category: "management"
    ports: ["9000:9000"]
    
  - name: "n8n"
    server: "macmini"
    directory: "/Users/weishen/docker/n8n"
    description: "工作流自动化"
    status: "active"
    category: "automation"
    ports: ["5678:5678"]

  - name: "it-tools"
    server: "macmini"
    directory: "/Users/weishen/docker/it-tools"
    description: "开发者工具集合 (UUID, Hash, QR Code等)"
    status: "active"
    category: "development"
    ports: ["8080:80"]

  - name: "drawio"
    server: "macmini"
    directory: "/Users/weishen/docker/drawio"
    description: "在线 diagramming 工具"
    status: "active"
    category: "development"
    ports: ["8085:8080"]

  # ubuntu1服务器上的应用
  - name: "portainer-ubuntu1"
    server: "ubuntu1"
    directory: "/home/shenwei/docker/portainer"
    description: "Docker容器管理"
    status: "active"
    category: "management"
    ports: ["9000:9000"]
    
  - name: "nginx-proxy-manager"
    server: "ubuntu1"
    directory: "/home/shenwei/docker/nginx-proxy-manager"
    description: "反向代理管理"
    status: "active"
    category: "networking"
    ports: ["80:80", "443:443", "81:81"]
    
  - name: "mysql"
    server: "ubuntu1"
    directory: "/home/shenwei/docker/mysql"
    description: "MySQL数据库"
    status: "active"
    category: "database"
    ports: ["3306:3306"]
    
  - name: "redis"
    server: "ubuntu1"
    directory: "/home/shenwei/docker/redis"
    description: "Redis缓存"
    status: "active"
    category: "database"
    ports: ["6379:6379"]
    
  - name: "mongodb"
    server: "ubuntu1"
    directory: "/home/shenwei/docker/mongodb"
    description: "MongoDB数据库"
    status: "active"
    category: "database"
    ports: ["27017:27017"]
    
  - name: "elasticsearch"
    server: "ubuntu1"
    directory: "/home/shenwei/docker/elasticsearch"
    description: "搜索引擎"
    status: "active"
    category: "database"
    ports: ["9200:9200", "9300:9300"]

  # ubuntu2服务器上的应用
  - name: "portainer-ubuntu2"
    server: "ubuntu2"
    directory: "/home/shenwei/docker/portainer"
    description: "Docker容器管理"
    status: "active"
    category: "management"
    ports: ["9000:9000"]
    
  - name: "prometheus"
    server: "ubuntu2"
    directory: "/home/shenwei/docker/prometheus"
    description: "监控系统"
    status: "active"
    category: "monitoring"
    ports: ["9090:9090"]
    
  - name: "grafana"
    server: "ubuntu2"
    directory: "/home/shenwei/docker/grafana"
    description: "数据可视化"
    status: "active"
    category: "monitoring"
    ports: ["3000:3000"]
    
  - name: "alertmanager"
    server: "ubuntu2"
    directory: "/home/shenwei/docker/alertmanager"
    description: "告警管理"
    status: "active"
    category: "monitoring"
    ports: ["9093:9093"]
    
  - name: "node-exporter"
    server: "ubuntu2"
    directory: "/home/shenwei/docker/node-exporter"
    description: "节点监控"
    status: "active"
    category: "monitoring"
    ports: ["9100:9100"]
    
  - name: "cadvisor"
    server: "ubuntu2"
    directory: "/home/shenwei/docker/cadvisor"
    description: "容器监控"
    status: "active"
    category: "monitoring"
    ports: ["8080:8080"]

  # NAS服务器上的应用
  - name: "jellyfin"
    server: "NAS"
    directory: "/volume1/docker/jellyfin"
    description: "媒体服务器"
    status: "active"
    category: "media"
    ports: ["8096:8096", "7359:7359/udp"]
    
  - name: "navidrome"
    server: "NAS"
    directory: "/volume1/docker/navidrome"
    description: "音乐服务器"
    status: "active"
    category: "media"
    ports: ["4533:4533"]
    
  - name: "calibre-web"
    server: "NAS"
    directory: "/volume1/docker/calibre-web"
    description: "电子书管理"
    status: "active"
    category: "media"
    ports: ["8083:8083"]
    
  - name: "zipline"
    server: "NAS"
    directory: "/volume1/docker/zipline-stack"
    description: "文件分享服务"
    status: "active"
    category: "storage"
    ports: ["3333:3000"]
    
  - name: "minio"
    server: "NAS"
    directory: "/volume1/docker/zipline-stack"
    description: "对象存储"
    status: "active"
    category: "storage"
    ports: ["9000:9000", "9001:9001"]
    
  - name: "vaultwarden-nas"
    server: "NAS"
    directory: "/volume1/docker/vaultwarden"
    description: "密码管理器(NAS版)"
    status: "active"
    category: "security"
    ports: ["3012:3012", "5151:80"]
    
  - name: "portainer-nas"
    server: "NAS"
    directory: "/volume1/docker/portainer"
    description: "Docker容器管理(NAS)"
    status: "active"
    category: "management"
    ports: ["8000:8000", "9443:9443"]
    
  - name: "prometheus-nas"
    server: "NAS"
    directory: "/volume1/docker/prometheus"
    description: "监控系统(NAS)"
    status: "active"
    category: "monitoring"
    ports: ["9090:9090"]
    
  - name: "alertmanager-nas"
    server: "NAS"
    directory: "/volume1/docker/alertmanager"
    description: "告警管理(NAS)"
    status: "active"
    category: "monitoring"
    ports: ["9093:9093"]
    
  - name: "node-exporter-nas"
    server: "NAS"
    directory: "/volume1/docker/node-exporter"
    description: "节点监控(NAS)"
    status: "active"
    category: "monitoring"
    
  - name: "v2raya"
    server: "NAS"
    directory: "/volume1/docker/v2raya"
    description: "网络代理工具"
    status: "active"
    category: "networking"
    
  - name: "zipline-postgres"
    server: "NAS"
    directory: "/volume1/docker/zipline-stack"
    description: "Zipline数据库"
    status: "active"
    category: "database"
    ports: ["5432:5432"]
    
  # 以下应用在docker ps中未发现，但端口检查显示在运行或配置存在
  - name: "transmission"
    server: "NAS"
    directory: "/volume1/docker/transmission"
    description: "BT下载客户端"
    status: "unknown"
    category: "download"
    ports: ["9091:9091", "51413:51413"]
    
categories:
  monitoring:
    count: 8
    description: "监控和告警应用"
    
  database:
    count: 6
    description: "数据库和存储应用"
    
  management:
    count: 4
    description: "管理和运维工具"
    
  automation:
    count: 2
    description: "自动化工具"
    
  security:
    count: 3
    description: "安全和访问控制"
    
  media:
    count: 4
    description: "媒体服务"
    
  download:
    count: 3
    description: "下载管理"
    
  networking:
    count: 3
    description: "网络和代理"
    
  storage:
    count: 4
    description: "存储服务"

# 统计信息
statistics:
  total_servers: 4
  total_applications: 35
  active_applications: 29
  stopped_applications: 4
  unknown_status: 2
  total_ports: 48
  last_updated: "2026-03-14 02:45 GMT+8"
