-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.ha.yml
137 lines (129 loc) · 4.74 KB
/
docker-compose.ha.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
version: '2.4'
services:
homeassistant:
container_name: home-assistant
image: homeassistant/raspberrypi4-homeassistant:stable
volumes:
- homeassistant-config:/config
- /etc/localtime:/etc/localtime:ro
- /var/run/restartd_signal:/var/run/restartd_signal
restart: always
network_mode: host
environment:
TZ: Europe/London
logging:
options:
max-size: 10m
labels:
- "traefik.enable=true"
- "traefik.http.routers.ha-internal.rule=Host(`homeassistant.${INTERNAL_DOMAIN}`)"
- "traefik.http.routers.ha-internal.entrypoints=web"
- "traefik.http.routers.ha-insecure.rule=Host(`${EXTERNAL_DOMAIN}`)"
- "traefik.http.routers.ha-insecure.entrypoints=web"
- "traefik.http.routers.ha-insecure.middlewares=redirecthttps@file,riptp@file"
- "traefik.http.routers.ha.rule=Host(`${EXTERNAL_DOMAIN}`)"
- "traefik.http.routers.ha.entrypoints=websecure"
- "traefik.http.routers.ha.middlewares=riptp@file"
- "traefik.http.routers.ha.tls=true"
- "traefik.http.routers.ha.tls.certresolver=le"
- "traefik.http.services.ha.loadbalancer.server.port=8123"
deconz:
container_name: deconz
image: marthoc/deconz
volumes:
- deconz-config:/root/.local/share/dresden-elektronik/deCONZ
- /etc/localtime:/etc/localtime:ro
restart: always
networks:
- net
- traefik_proxy
environment:
DECONZ_DEVICE: /dev/ttyACM0
DECONZ_WS_PORT: 8443
DECONZ_VNC_MODE: 1
devices:
- /dev/ttyACM0
logging:
options:
max-size: 10m
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik_proxy"
- "traefik.http.routers.phoscon.rule=Host(`phoscon.${INTERNAL_DOMAIN}`)"
- "traefik.http.routers.phoscon.entrypoints=web"
- "traefik.http.routers.phoscon.service=phoscon"
- "traefik.http.services.phoscon.loadbalancer.server.port=80"
- "traefik.http.routers.phoscon-ws.rule=Host(`phoscon.${INTERNAL_DOMAIN}`)"
- "traefik.http.routers.phoscon-ws.entrypoints=phosconws"
- "traefik.http.routers.phoscon-ws.service=phoscon-ws"
- "traefik.http.services.phoscon-ws.loadbalancer.server.port=8443"
mosquitto:
container_name: mosquitto
image: eclipse-mosquitto
volumes:
- mosquitto-data:/mosquitto/data
- mosquitto-config:/mosquitto/config
restart: always
networks:
- net
- traefik_proxy
logging:
options:
max-size: 10m
labels:
- traefik.enable=true
- traefik.docker.network=traefik_proxy
- traefik.tcp.routers.mosquitto.entrypoints=mqtt
- traefik.tcp.routers.mosquitto.rule=HostSNI(`*`)
- traefik.tcp.routers.mosquitto.service=mosquitto
- traefik.tcp.services.mosquitto.loadbalancer.server.port=1883
mysql:
container_name: database
image: mariadb:latest
volumes:
- mariadb-data:/var/lib/mysql
restart: always
networks:
- net
- traefik_proxy
logging:
options:
max-size: 10m
labels:
- traefik.enable=true
- traefik.docker.network=traefik_proxy
- traefik.tcp.routers.mariadb.entrypoints=mysql
- traefik.tcp.routers.mariadb.rule=HostSNI(`*`)
- traefik.tcp.routers.mariadb.service=mariadb
- traefik.tcp.services.mariadb.loadbalancer.server.port=3306
networks:
net:
name: homeassistant
traefik_proxy:
external: true
volumes:
homeassistant-config:
name: homeassistant-config
driver: local-persist
driver_opts:
mountpoint: "${PERSIST_DATA_PATH}/data/homeassistant-config"
deconz-config:
name: deconz-config
driver: local-persist
driver_opts:
mountpoint: "${PERSIST_DATA_PATH}/data/deconz-config"
mosquitto-data:
name: mosquitto-data
driver: local-persist
driver_opts:
mountpoint: "${PERSIST_DATA_PATH}/data/mosquitto-data"
mosquitto-config:
name: mosquitto-config
driver: local-persist
driver_opts:
mountpoint: "${PERSIST_DATA_PATH}/data/mosquitto-config"
mariadb-data:
name: mariadb-data
driver: local-persist
driver_opts:
mountpoint: /data/mariadb-data