-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdocker-compose.yaml
74 lines (66 loc) · 2.16 KB
/
docker-compose.yaml
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
version: '3'
services:
# HomeAssistant
homeassistant:
container_name: home-assistant
image: homeassistant/home-assistant:latest
volumes:
# Local path where your home assistant config will be stored
- ./config/home-assistant:/config
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
network_mode: host
privileged: true
depends_on:
- mariadb # MariaDB is optional (only if you would like to use a different database for HA).
- zigbee2mqtt # zigbee2mqtt is optional (only if you want to add Zigbee devices and have a zigbee sniffer attached).
- eclipse-mosquitto # aka mosquitto-mqtt is optional (only if you want to add Zigbee devices and have a zigbee sniffer attached).
# MariaDb
mariadb:
container_name: mariadb
image: mariadb:latest
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD}"
MYSQL_DATABASE: ha_db
MYSQL_USER: homeassistant
MYSQL_PASSWORD: "${HA_MYSQL_PASSWORD}"
user: "${LOCAL_USER}:${LOCAL_USER}"
volumes:
# Local path where the database will be stored.
- ./store/mariadb:/var/lib/mysql
# eclipse-mosquitto (MQTT broker)
eclipse-mosquitto:
container_name: eclipse-mosquitto
image: eclipse-mosquitto:latest
restart: unless-stopped
network_mode: host
volumes:
- ./config/mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf
# zigbee2mqtt
zigbee2mqtt:
container_name: zigbee2mqtt
image: koenkk/zigbee2mqtt:latest
restart: unless-stopped
network_mode: host
environment:
- TZ=Europe/Amsterdam
volumes:
- ./config/zigbee2mqtt:/app/data
- /run/udev:/run/udev:ro
devices:
- "${ZIGBEE_ADAPTER_TTY}:/dev/ttyZigbee"
privileged: true
# Visual Studio code
vscode:
container_name: vscode
image: codercom/code-server:latest
restart: unless-stopped
environment:
PASSWORD: "${VSCODE_PASSWORD}"
volumes:
- .:/home/coder/project
- ./store/coder:/home/coder/.local/share/code-server
ports:
- "8443:8443"
command: code-server --auth password --port 8443 --disable-telemetry /home/coder/project