services:
  homeassistant:
    image: ghcr.io/home-assistant/home-assistant:stable
    container_name: homeassistant
    restart: unless-stopped
    network_mode: host
    privileged: true
    environment:
      TZ: Asia/Shanghai
    volumes:
      # 本地卷宗挂载
      - /mnt/sata2-4/docker_data/homeassistant:/config
      - /etc/localtime:/etc/localtime:ro

    logging:
      driver: json-file
      options:
        max-size: "10m"
        max-file: "3"