networks:
  traefik:
    external: true

services:
  homeassistant:
    image: lscr.io/linuxserver/homeassistant:latest
    container_name: homeassistant
    restart: unless-stopped
    networks:
      - traefik
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
    volumes:
      - /pwspool/software/homeassistant/config:/config
      - /pwspool/software/homeassistant/config/configuration.yaml:/config/configuration.yaml 
    labels:
      - traefik.http.routers.homeassistant.rule=Host(`iot.whitney.rip`)
      - traefik.http.routers.homeassistant.tls=true
      - traefik.http.routers.homeassistant.tls.certresolver=lets-encrypt
      - traefik.http.services.homeassistant.loadbalancer.server.port=8123
