feat: add deployment configuration for homeassistant service in Docker stack

This commit is contained in:
2026-04-26 13:38:50 +08:00
parent b99ab02fcc
commit b86190dcf6
2 changed files with 43 additions and 1 deletions
+35
View File
@@ -0,0 +1,35 @@
x-environment: &app-environment
DOMAIN: "${DOMAIN:-furyhawk.lol}"
networks:
traefik-public:
external: true
services:
homeassistant:
container_name: homeassistant
image: "ghcr.io/home-assistant/home-assistant:stable"
volumes:
- /var/data/config/homeassistant:/config
- /etc/localtime:/etc/localtime:ro
- /run/dbus:/run/dbus:ro
restart: unless-stopped
privileged: true
expose:
- 8123
network:
- traefik-public
environment:
- TZ=Asia/Singapore
- DOMAIN=${DOMAIN}
deploy:
labels:
- traefik.enable=true
- traefik.swarm.network=traefik-public
- traefik.constraint-label=traefik-public
- traefik.http.routers.homeassistant.entrypoints=https
- traefik.http.routers.homeassistant.rule=Host(`ha.${DOMAIN}`)
- traefik.http.routers.homeassistant.tls.certresolver=le
- traefik.http.routers.homeassistant.service=homeassistant_srv
- traefik.http.services.homeassistant_srv.loadbalancer.server.port=8123