--- services: homeassistant: container_name: homeassistant image: "ghcr.io/home-assistant/home-assistant:${HOMEASSISTANT_VERSION:-latest}" volumes: - ./data/config:/config - /etc/localtime:/etc/localtime:ro - /run/dbus:/run/dbus:ro restart: unless-stopped privileged: true networks: - traefik environment: - TZ=Europe/Rome cap_add: - NET_ADMIN - NET_BIND_SERVICE - SYS_ADMIN labels: - "traefik.enable=true" - "traefik.docker.network=traefik" - "traefik.http.routers.homeassistant.entrypoints=http" - "traefik.http.routers.homeassistant.rule=Host(`${HOMEASSISTANT_DOMAIN:?error}`)" - "traefik.http.middlewares.homeassistant-https-redirect.redirectscheme.scheme=https" - "traefik.http.routers.homeassistant.middlewares=homeassistant-https-redirect" - "traefik.http.routers.homeassistant-secure.entrypoints=https" - "traefik.http.routers.homeassistant-secure.rule=Host(`${HOMEASSISTANT_DOMAIN:?error}`)" - "traefik.http.routers.homeassistant-secure.tls=true" - "traefik.http.routers.homeassistant-secure.service=homeassistant" - "traefik.http.services.homeassistant.loadbalancer.server.port=8123" networks: traefik: external: true