# Configuration for big-bear-cadvisor setup
name: big-bear-cadvisor
# Service definitions for the big-bear-cadvisor application
services:
  # Service for cAdvisor, a tool to monitor container performance
  app:
    # Docker image to be used for cAdvisor
    image: gcr.io/cadvisor/cadvisor:v0.55.1
    # Name of the container instance
    container_name: monitoring_cadvisor
    # Restart policy - Restart the container unless it's stopped manually
    restart: unless-stopped
    # List of device mappings between host and container
    devices:
      # Map the host's kernel message log to the container
      - "/dev/kmsg:/dev/kmsg"
    # Volumes to be mounted to the container
    volumes:
      # Mount the root directory of the host in a read-only mode
      - /:/rootfs:ro
      # Mount the var run directory of the host in a read-write mode
      - /var/run:/var/run:rw
      # Mount Docker socket to allow cAdvisor to monitor other containers
      - /var/run/docker.sock:/var/run/docker.sock:rw
      # Mount system directory of the host in a read-only mode for system metrics
      - /sys:/sys:ro
      # Mount Docker library directory in a read-only mode
      - /var/lib/docker/:/var/lib/docker:ro
      # Mount the disk directory of the host in a read-only mode for disk metrics
      - /dev/disk/:/dev/disk:ro
    # Ports to be exposed from the container
    expose:
      # Expose port 8080 from the container
      - 8080
    # Port mappings between host and container
    ports:
      # Map port 8085 of the host to port 8080 of the container
      - 8085:8080
    x-casaos:
      volumes:
        - container: /rootfs
          description:
            en_us: 'Container Path: /rootfs'
        - container: /var/run
          description:
            en_us: 'Container Path: /var/run'
        - container: /var/run/docker.sock
          description:
            en_us: 'Container Path: /var/run/docker.sock'
        - container: /sys
          description:
            en_us: 'Container Path: /sys'
        - container: /var/lib/docker
          description:
            en_us: 'Container Path: /var/lib/docker'
        - container: /dev/disk
          description:
            en_us: 'Container Path: /dev/disk'
      ports:
        - container: "8080"
          description:
            en_us: 'Container Port: 8080'
x-casaos:
  # Supported CPU architectures for this application
  architectures:
    - amd64
    - arm64
  # Main service for this application
  main: app
  # Detailed description for the application
  description:
    en_us: cAdvisor (Container Advisor) provides container users an understanding of the resource usage and performance characteristics of their running containers. It is a running daemon that collects, aggregates, processes, and exports information about running containers. Specifically, for each container it keeps resource isolation parameters, historical resource usage, histograms of complete historical resource usage and network statistics. This data is exported by container and machine-wide.
  # Brief tagline for the application
  tagline:
    en_us: cAdvisor
  # Developer's information
  developer: cadvisor
  # Author of this particular configuration
  author: BigBearTechWorld
  # Icon URL for the application
  icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/cadvisor.png
  # Thumbnail image for the application (if any)
  thumbnail: ""
  # Title for the application
  title:
    en_us: cAdvisor
  # Category under which the application falls
  category: BigBearCasaOS
  # Default port mapping for the application
  port_map: "8085"
