foodotfiles/docker/homeautomation/docker-compose.yml
2020-12-06 12:52:08 +02:00

163 lines
4.7 KiB
YAML

version: "3"
services:
home-assistant:
container_name: home-assistant
image: homeassistant/home-assistant
environment:
- TZ=Europe/Helsinki
devices:
- /dev/ttyACM0
volumes:
- /docker/homeautomation/home-assistant:/config
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
networks:
- homeautomation
- mariadb
- proxy
ports:
- "8123:8123"
depends_on:
- mosquitto
labels:
- "traefik.enable=true"
- "traefik.http.routers.home-assistant-redirect.entrypoints=http"
- "traefik.http.routers.home-assistant-redirect.rule=Host(`home.korhonen.cc`)"
- "traefik.http.middlewares.http2https.redirectscheme.scheme=https"
- "traefik.http.routers.home-assistant-redirect.middlewares=http2https"
- "traefik.http.routers.home-assistant.entrypoints=https"
- "traefik.http.routers.home-assistant.rule=Host(`home.korhonen.cc`)"
- "traefik.http.routers.home-assistant.tls=true"
- "traefik.http.routers.home-assistant.tls.certresolver=http"
- "traefik.http.routers.home-assistant.service=home-assistant"
- "traefik.docker.network=proxy"
- "traefik.http.services.home-assistant.loadbalancer.server.port=8123"
mosquitto:
container_name: mosquitto
image: eclipse-mosquitto
environment:
- TZ=Europe/Helsinki
ports:
- "1883:1883"
networks:
- homeautomation
volumes:
- /docker/homeautomation/mosquitto:/mosquitto
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
rhasspy:
container_name: rhasspy
image: rhasspy/rhasspy
command: --profile en --user-profiles /profiles
volumes:
- /docker/homeautomation/rhasspy:/profiles
environment:
- TZ=Europe/Helsinki
ports:
- "12101:12101"
networks:
- homeautomation
restart: unless-stopped
depends_on:
- home-assistant
- opentts
devices:
- "/dev/snd:/dev/snd"
opentts:
image: synesthesiam/opentts
container_name: opentts
ports:
- 5500:5500
command: --marytts-url http://marytts:59125 --mozillatts-url http://mozillatts:5002
tty: true
networks:
- homeautomation
depends_on:
- marytts
- mozillatts
marytts:
image: synesthesiam/marytts:5.2
container_name: marytts
tty: true
networks:
- homeautomation
mozillatts:
image: synesthesiam/mozilla-tts
container_name: mozillatts
tty: true
networks:
- homeautomation
node-red:
container_name: node-red
image: nodered/node-red
environment:
- TZ=Europe/Helsinki
- proxy
ports:
- "1880:1880"
networks:
- homeautomation
volumes:
- /docker/homeautomation/node-red:/data
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
depends_on:
- home-assistant
labels:
- "traefik.enable=true"
- "traefik.http.routers.node-red-redirect.entrypoints=http"
- "traefik.http.routers.node-red-redirect.rule=Host(`node.korhonen.cc`)"
- "traefik.http.middlewares.http2https.redirectscheme.scheme=https"
- "traefik.http.routers.node-red-redirect.middlewares=http2https"
- "traefik.http.routers.node-red.entrypoints=https"
- "traefik.http.routers.node-red.rule=Host(`node.korhonen.cc`)"
- "traefik.http.routers.node-red.tls=true"
- "traefik.http.routers.node-red.tls.certresolver=http"
- "traefik.http.routers.node-red.service=node-red"
- "traefik.docker.network=proxy"
- "traefik.http.services.node-red.loadbalancer.server.port=1880"
gotify:
image: gotify/server
container_name: gotify
volumes:
- /docker/homeautomation/gotify:/app/data
environment:
- GOTIFY_DATABASE_DIALECT=mysql
- GOTIFY_DATABASE_CONNECTION=gotify:gotify@tcp(mariadb:3306)/gotify?charset=utf8&parseTime=True&loc=Local
networks:
- proxy
- mariadb
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.gotify-redirect.entrypoints=http"
- "traefik.http.routers.gotify-redirect.rule=Host(`gotify.korhonen.cc`)"
- "traefik.http.middlewares.http2https.redirectscheme.scheme=https"
- "traefik.http.routers.gotify-redirect.middlewares=http2https"
- "traefik.http.routers.gotify.entrypoints=https"
- "traefik.http.routers.gotify.rule=Host(`gotify.korhonen.cc`)"
- "traefik.http.routers.gotify.tls=true"
- "traefik.http.routers.gotify.tls.certresolver=http"
- "traefik.http.routers.gotify.service=gotify"
- "traefik.docker.network=proxy"
- "traefik.http.services.gotify.loadbalancer.server.port=80"
networks:
homeautomation:
external: false
mariadb:
external: true
proxy:
external: true