I’ve been migrating my home network to Docker Swarm for the last few month. As the last part and that was the trigger of the whole project I begun installing homeassistant. For now homeassistant core and deconz (I’m using Raspbee on a RPI3) is running.
Do get this up and running I related highly on My Docker Swarm Setup and [workaround] Docker Stack device mapping
As I’m new to homeassistant as well as docker it wasn’t easy to get it up and running and for now I don’t understand all of what I have done so far.
This is how my stack looks for the moment:
version: '3.3'
services:
homeassistant:
image: homeassistant/home-assistant:stable
volumes:
- /var/lib/gluster-vol/swarm/homeassistant/config:/config
- /etc/localtime:/etc/localtime:ro
networks:
- macvlan_swarm
- traefik-public
logging:
driver: json-file
deploy:
labels:
traefik.enable: 'true'
traefik.http.routers.homeassistant.entrypoints: web
traefik.http.routers.homeassistant.rule: Host(`ha.pyramid.lan`)
traefik.http.services.homeassistant.loadbalancer.server.port: '8123'
deconz:
container_name: deconz
restart: always
image: marthoc/deconz
ports:
- '85:80'
- '9443:9443'
- '5900:5900'
environment:
- DECONZ_WEB_PORT=80
- DECONZ_WS_PORT=9443
- DECONZ_VNC_MODE=1
- DECONZ_DEVICE=/dev/serial0
volumes:
- '/etc/localtime:/etc/localtime:ro'
- '/dev/serial0:/dev/serial0'
- '/opt/deconz:/root/.local/share/dresden-elektronik/deCONZ'
networks:
- traefik-public
deploy:
mode: replicated
replicas: 1
placement:
constraints: [node.hostname == ant]
labels:
- "traefik.enable=true"
- "traefik.http.routers.deconz.rule=Host(`phoscon.pyramid.lan`)"
- "traefik.http.routers.deconz.entrypoints=web"
- "traefik.http.services.deconz.loadbalancer.server.port=80"
networks:
macvlan_swarm:
external: true
traefik-public:
external: true
So far this is running now, but there are some more things todo I don’t understand right now.
When installing homeassistant (supervised) three additional containers hassio_dns, hassio_supervisor and hass-audio get installed.
I think I understand supervisor quite well, it controls the installation, provides snapshot creation and the add-on store. As I have to setup services for everything the only I’m missing from there is Snapshot creation, but I think I can overcome this.
hass-audio I don’t unterstand at all, I hope somebody can tell me for what this is used.
last but not least there is hassio_dns, as DNS resolution does not work in homeassistant container it is obvious that this one is needed. What does this container and how could I setup this as a service?
Edit:
I know hassio_dns does DNS resolution, but how it’s integrated and as I read in other posts resolution of internal Domains doesn’t work in homeassistant. What I don’t understand is why is DNS resolution not working at all and why hassio_dns is used in homeassistant? Other container resolv DNS internal and external without problems.