From 2503bdff112792aedc896a1441d1ec976d555d21 Mon Sep 17 00:00:00 2001 From: jaydee Date: Mon, 1 Dec 2025 00:44:21 +0100 Subject: [PATCH] build --- .../home-assistant/home-assistant-swarm.yml | 226 ++++++++++++++++++ 1 file changed, 226 insertions(+) create mode 100644 __swarm/home-assistant/home-assistant-swarm.yml diff --git a/__swarm/home-assistant/home-assistant-swarm.yml b/__swarm/home-assistant/home-assistant-swarm.yml new file mode 100644 index 0000000..9876479 --- /dev/null +++ b/__swarm/home-assistant/home-assistant-swarm.yml @@ -0,0 +1,226 @@ +services: + homeassistant: + network_mode: host + image: ${DOCKER_REGISTRY:-}ghcr.io/home-assistant/home-assistant:latest + volumes: + - ha_config:/config + - /var/run/docker.sock:/var/run/docker.sock + - /run/dbus:/run/dbus:ro + privileged: true + environment: + DISABLE_JEMALLOC: value + TZ: Europe/Bratislava + dns: + - 192.168.77.101 + deploy: + labels: + com.centurylinklabs.watchtower.enable: 'true' + homepage.group: Smarthome + homepage.name: Home Assistant + homepage.weight: '1' + homepage.icon: home-assistant.png + homepage.href: https://ha.sectorq.eu + homepage.description: 3D Printing + homepage.server: my-docker-swarm + homepage.container: HomeAssistant + homepage.widget.type: homeassistant + homepage.widget.url: https://ha.sectorq.eu + homepage.widget.key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiIzOTk5NGJjYjIzYjk0YzExYmM5OWZiNTBlNzU0N2M2YyIsImlhdCI6MTc0MDM5OTY4NCwiZXhwIjoyMDU1NzU5Njg0fQ.LDebvPGreyZzlWT1CylHSdSt8i_cWO72HnNCsCAIaG8 + wud.watch: 'true' + wud.watch.digest: 'true' + replicas: 1 + placement: + constraints: + - node.role == manager + esphome: + image: ${DOCKER_REGISTRY:-}esphome/esphome:latest + volumes: + - esphome_config:/config + - /etc/localtime:/etc/localtime:ro + privileged: true + network_mode: host + environment: + USERNAME: jaydee + PASSWORD: jaydee1 + deploy: + labels: + com.centurylinklabs.watchtower.enable: 'true' + homepage.group: Smarthome + homepage.name: ESPHome + homepage.weight: '1' + homepage.icon: esphome.png + homepage.href: https://esphome.sectorq.eu + homepage.description: 3D Printing + homepage.server: my-docker-swarm + homepage.container: esphome + homepage.widget.type: esphome + homepage.widget.url: https://esphome.sectorq.eu + homepage.widget.username: jaydee + homepage.widget.password: jaydee1 + wud.watch: 'true' + wud.watch.digest: 'true' + replicas: 1 + placement: + constraints: + - node.role == manager + wyoming-piper-en: + image: ${DOCKER_REGISTRY:-}rhasspy/wyoming-piper + ports: + - target: 10200 + published: 10200 + protocol: tcp + mode: ingress + volumes: + - piper_data:/data + command: --data-dir /data --voice en_US-lessac-medium + deploy: + labels: + com.centurylinklabs.watchtower.enable: 'true' + wud.watch: 'true' + wud.watch.digest: 'true' + replicas: 1 + placement: + constraints: + - node.role == manager + wyoming-whisper-en: + image: ${DOCKER_REGISTRY:-}rhasspy/wyoming-whisper + ports: + - target: 10300 + published: 10300 + protocol: tcp + mode: ingress + volumes: + - whisper_data:/data + command: --data-dir /data --model tiny-int8 --language en + deploy: + labels: + com.centurylinklabs.watchtower.enable: 'true' + wud.watch: 'true' + wud.watch.digest: 'true' + replicas: 1 + placement: + constraints: + - node.role == manager + openwakeword: + image: ${DOCKER_REGISTRY:-}rhasspy/wyoming-openwakeword:latest + command: --preload-model 'ok_nabu' --custom-model-dir /custom --model 'ok nabu' + --model 'ok_nabu' --uri 'tcp://0.0.0.0:10400' --threshold 0.7 --trigger-level + 2 --debug + volumes: + - openwakeword_data:/data + - openwakeword_data:/custom + environment: + TZ: Europe/Bratislava + ports: + - target: 10400 + published: 10400 + protocol: tcp + mode: ingress + deploy: + labels: + com.centurylinklabs.watchtower.enable: 'true' + wud.watch: 'true' + wud.watch.digest: 'true' + replicas: 1 + placement: + constraints: + - node.role == manager + matter-server: + image: ${DOCKER_REGISTRY:-}ghcr.io/home-assistant-libs/python-matter-server:stable + security_opt: + - apparmor=unconfined + volumes: + - matter-server:/data + - /run/dbus:/run/dbus:ro + network_mode: host + deploy: + labels: + com.centurylinklabs.watchtower.enable: 'true' + wud.watch: 'true' + wud.watch.digest: 'true' + replicas: 1 + placement: + constraints: + - node.role == manager + music-assistant-server: + image: ${DOCKER_REGISTRY:-}ghcr.io/music-assistant/server:latest + network_mode: host + volumes: + - music_assistant_server_data:/data/ + cap_add: + - SYS_ADMIN + - DAC_READ_SEARCH + security_opt: + - apparmor:unconfined + environment: + LOG_LEVEL: info + deploy: + labels: + com.centurylinklabs.watchtower.enable: 'true' + wud.watch: 'true' + wud.watch.digest: 'true' + homepage.group: Smarthome + homepage.name: music-assistant + homepage.weight: '1' + homepage.icon: music-assistant.png + homepage.href: https://music.sectorq.eu + homepage.description: Music + homepage.server: my-docker-swarm + homepage.container: music-assistant-server + replicas: 1 + placement: + constraints: + - node.role == manager + influxdb: + ports: + - target: 8086 + published: 8086 + protocol: tcp + mode: ingress + volumes: + - influxdb2_data:/var/lib/influxdb2 + - influxdb2_config:/etc/influxdb2 + secrets: + - influxdb2-admin-username + - influxdb2-admin-password + - ha_influxdb2_admin_token + environment: + DOCKER_INFLUXDB_INIT_MODE: setup + DOCKER_INFLUXDB_INIT_USERNAME: ha + DOCKER_INFLUXDB_INIT_PASSWORD: haHAhaHA + DOCKER_INFLUXDB_INIT_ORG: ha + DOCKER_INFLUXDB_INIT_BUCKET: ha + #DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: mytoken123 + DOCKER_INFLUXDB_INIT_ADMIN_TOKEN_FILE: /run/secrets/ha_influxdb2_admin_token + image: ${DOCKER_REGISTRY:-}influxdb:2 + healthcheck: + test: echo test > /var/lib/influxdb2/hc || exit 1 + interval: 10s + timeout: 3s + retries: 2 + deploy: + labels: + com.centurylinklabs.watchtower.enable: 'true' + wud.watch: 'true' + wud.watch.digest: 'true' + replicas: 1 + placement: + constraints: + - node.role == manager +volumes: + influxdb2_data: + influxdb2_config: + music_assistant_server_data: + matter-server: + ha_config: + esphome_config: + piper_data: + whisper_data: + openwakeword_data: +secrets: + ha_influxdb2_admin_username: + file: .env.influxdb2-admin-username + influxdb2-admin-password: + file: .env.influxdb2-admin-password + ha_influxdb2_admin_token: + external: true