homelab/archive/2022.bxl-swarm/smarthome.stack.yaml

62 lines
1.4 KiB
YAML
Raw Normal View History

2023-01-28 00:10:16 +01:00
version: '3.7'
services:
hass:
image: ghcr.io/home-assistant/home-assistant:stable
volumes:
- /mnt/nfs/hass:/config
- /etc/localtime:/etc/localtime:ro
networks:
- storage
2023-02-05 16:26:14 +01:00
- smarthome
2023-01-28 00:10:16 +01:00
- external
deploy:
mode: replicated
replicas: 1
restart_policy:
condition: any
max_attempts: 3
labels:
- "traefik.enable=true"
- "traefik.http.routers.hass.rule=Host(`hass.bxl.bhasher.com`)"
- "traefik.http.routers.hass.entrypoints=internalsecure"
- "traefik.http.services.hass.loadbalancer.server.port=8123"
- "traefik.http.routers.hass.tls=true"
- "traefik.http.routers.hass.tls.certresolver=http"
2023-02-03 23:48:45 +01:00
placement:
constraints:
- node.labels.POWER == true
depends_on:
- system_traefik
- system_nfs
- storage_postgres
2023-01-28 00:10:16 +01:00
2023-01-31 17:51:00 +01:00
mosquitto:
image: eclipse-mosquitto:latest
volumes:
- /mnt/nfs/mosquitto/config:/mosquitto/config
- /mnt/nfs/mosquitto/data:/mosquitto/data
ports:
- 1883:1883
- 9001:9001
networks:
2023-02-05 16:26:14 +01:00
- smarthome
2023-01-31 17:51:00 +01:00
- external
deploy:
mode: replicated
replicas: 1
restart_policy:
condition: any
max_attempts: 3
2023-02-03 23:48:45 +01:00
placement:
constraints:
- node.labels.POWER == true
depends_on:
- system_nfs
2023-01-31 17:51:00 +01:00
2023-01-28 00:10:16 +01:00
networks:
2023-02-05 16:26:14 +01:00
smarthome:
storage:
external: true
2023-01-28 00:10:16 +01:00
external:
external: true