docker-compose-collection/homeassistant/docker-compose.yml

35 lines
1.3 KiB
YAML
Raw Normal View History

2025-03-16 21:16:44 +00:00
---
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
2025-03-16 21:52:44 +00:00
networks:
- traefik
2025-03-16 21:16:44 +00:00
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"
2025-03-16 21:52:44 +00:00
- "traefik.http.services.homeassistant.loadbalancer.server.port=8123"
networks:
traefik:
external: true