services:
  homeassistant:
    container_name: ${CONTAINER_NAME}
    image: "ghcr.io/home-assistant/home-assistant:stable"
    volumes:
      - ${HOME_DIR}/${CONTAINER_NAME}/config:/config
      - ${LOCALTIME}:${LOCALTIME}:ro
      - /run/dbus:/run/dbus:ro
    restart: unless-stopped
    env_file:
      - path: ./homeassistant.env
        required: true
      - path: ../global.env
        required: true
    privileged: true
    network_mode: "host"
    devices:
      - ${P1_PORT_DEV}:/dev/ttyACM0
      - ${ZIGBEE_DONGLE_PORT_DEV}:/dev/ttyUSB0
    environment:
      DISABLE_JEMALLOC: true
