-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
92 lines (86 loc) · 2.04 KB
/
docker-compose.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
services:
app:
image: lscr.io/linuxserver/homeassistant
restart: unless-stopped
depends_on:
- db
- broker
- bridge
environment:
- PUID=1000
- PGID=1000
- TZ
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db/${POSTGRES_DB}
- DOCKER_MODS=linuxserver/mods:homeassistant-hacs
volumes:
- app_conf:/config
networks:
default:
proxy_apps:
host_mode:
ipv4_address: ${HASS_IP}
db:
image: postgres:17-alpine
restart: unless-stopped
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
volumes:
- db_data:/var/lib/postgresql/data
networks:
default:
labels:
ofelia.restart: "true"
ofelia.enabled: "true"
ofelia.job-exec.homeassistantdbbackup.schedule: "0 0 1 * * *"
ofelia.job-exec.homeassistantdbbackup.command: "sh -c 'pg_dumpall -U $POSTGRES_USER -f /var/lib/postgresql/data/backup.sql'"
broker:
image: eclipse-mosquitto:latest
restart: unless-stopped
volumes:
- broker_data:/mosquitto/data
- broker_log:/mosquitto/log
- $PWD/conf/mosquitto.conf:/mosquitto/config/mosquitto.conf
networks:
default:
bridge:
image: koenkk/zigbee2mqtt
restart: unless-stopped
depends_on:
- broker
environment:
- ZIGBEE2MQTT_CONFIG_MQTT_SERVER=mqtt://broker:1883
- ZIGBEE2MQTT_CONFIG_FRONTEND_PORT=8080
- ZIGBEE2MQTT_CONFIG_ADVANCED_LOG_LEVEL=warning
- ZIGBEE2MQTT_CONFIG_ADVANCED_LAST_SEEN=ISO_8601
- TZ
volumes:
- /run/udev:/run/udev:ro
- bridge_data:/app/data
networks:
default:
proxy_apps:
group_add:
- dialout
user: 1000:1000
devices:
- ${ZIGBEE_DEVICE}
volumes:
app_conf:
db_data:
broker_data:
broker_log:
bridge_data:
networks:
proxy_apps:
name: proxy_apps
external: true
host_mode:
name: host_mode
driver: macvlan
driver_opts:
parent: ${HOSTINTERFACE}
ipam:
config:
- subnet: ${SUBNET}