services:
  home-assistant:
    extends:
      file: ${TEMPLATES_PATH}
      service: default
    image: ghcr.io/home-assistant/home-assistant:2026.2.2
    container_name: home-assistant
    networks:
      - ip4net
    ports:
      - 4012:8123
    volumes:
      - ${SERVICE_PATH}/home-assistant/config:/config
      - /etc/localtime:/etc/localtime:ro
      - /run/dbus:/run/dbus:ro
    labels:
      # Traefik
      - "traefik.enable=true"
      - "traefik.http.routers.home-assistant.rule=Host(`ha.${LOCAL_DOMAIN}`)"
      - "traefik.http.routers.home-assistant.entrypoints=https"
      - "traefik.http.routers.home-assistant.tls=true"

