# Configuration for gladys setup

# Name of the big-bear-gladys application
name: big-bear-gladys
# Service definitions for the big-bear-gladys application
services:
  # Service name: app
  # The `app` service definition
  app:
    image: gladysassistant/gladys:v4.79.0 # Docker image to use for the 'app' service
    restart: always # Container should always restart
    privileged: true # Grants additional privileges to this container
    network_mode: host
    container_name: gladys
    cgroup: host
    environment: # Environment variables for the container
      NODE_ENV: production # Sets the environment to production
      SQLITE_FILE_PATH: /var/lib/gladysassistant/gladys-production.db # Path to the SQLite database
      TZ: Europe/Paris # Timezone
      SERVER_PORT: "1080" # Server port for UI
    volumes: # Mount points from the host to the container
      - /var/run/docker.sock:/var/run/docker.sock # Docker socket file for Docker within Docker
      - /DATA/AppData/$AppID/data:/var/lib/gladysassistant # Persistent storage for Gladys data
      - /dev:/dev # Access to host devices
      - /run/udev:/run/udev # Access to host devices
    x-casaos:
      envs:
        - container: NODE_ENV
          description:
            en_us: 'Container Variable: NODE_ENV'
        - container: SQLITE_FILE_PATH
          description:
            en_us: 'Container Variable: SQLITE_FILE_PATH'
        - container: TZ
          description:
            en_us: 'Container Variable: TZ'
        - container: SERVER_PORT
          description:
            en_us: 'Container Variable: SERVER_PORT'
      volumes:
        - container: /var/run/docker.sock
          description:
            en_us: 'Container Path: /var/run/docker.sock'
        - container: /var/lib/gladysassistant
          description:
            en_us: 'Container Path: /var/lib/gladysassistant'
        - container: /dev
          description:
            en_us: 'Container Path: /dev'
        - container: /run/udev
          description:
            en_us: 'Container Path: /run/udev'
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: Gladys Assistant is a modern, privacy-first & open-source home automation software that runs anywhere.
  # Screenshot links for the application
  screenshot_link:
    - https://gladysassistant.com/img/home/main_screenshot/main_screenshot_en_j5czyj_c_scale,w_2526.png
  # Brief tagline for the application
  tagline:
    en_us: A privacy-first, open-source home assistant.
  # Developer's information
  developer: GladysAssistant
  # Author of this particular configuration
  author: BigBearTechWorld
  # Icon URL for the application
  icon: https://gladysassistant.com/img/external/github-gladys-logo.png
  # Thumbnail image for the application (if any)
  thumbnail: https://gladysassistant.com/img/home/main_screenshot/main_screenshot_en_j5czyj_c_scale,w_2526.png
  # Title for the application
  title:
    en_us: Gladys Assistant
  # Category under which the application falls
  category: BigBearCasaOS
  # Default port mapping for the application
  port_map: "1080"
