-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
160 lines (154 loc) · 3.94 KB
/
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
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
services:
home-assistant:
depends_on:
postgres:
condition: service_healthy
influxdb:
condition: service_healthy
mosquitto:
condition: service_healthy
container_name: home-assistant
image: homeassistant/home-assistant:2024.11.2
restart: unless-stopped
networks:
home-assistant-external:
home-assistant:
aliases:
- home-assistant.home
ports:
- 8123:8123
user: "${UID}:${GID}"
volumes:
- ./home-assistant/config:/config
environment:
- TZ=${TZ}
- DB_CONNECTION=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres.home:5432/${POSTGRES_DB}
- INFLUXDB_ORG=${INFLUXDB_ORG}
- INFLUXDB_BUCKET=${INFLUXDB_BUCKET}
- INFLUXDB_TOKEN=${INFLUXDB_ADMIN_TOKEN}
postgres:
container_name: home-assistant-pg
image: postgres:17.1-alpine
restart: unless-stopped
networks:
home-assistant:
aliases:
- postgres.home
ports:
- 5432:5432
healthcheck:
test: pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}
interval: 20s
timeout: 5s
retries: 3
start_period: 20s
start_interval: 2s
user: "${UID}:${GID}"
volumes:
- ./postgres/data:/var/lib/postgresql/data
environment:
- TZ=${TZ}
- PGTZ=${PGTZ}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
influxdb:
container_name: home-assistant-influx
image: influxdb:2.7-alpine
restart: unless-stopped
networks:
home-assistant:
aliases:
- influxdb.home
ports:
- 8086:8086
healthcheck:
test: influx ping
interval: 20s
timeout: 5s
retries: 3
start_period: 20s
start_interval: 2s
user: "${UID}:${GID}"
volumes:
- ./influxdb/data:/var/lib/influxdb2
# - ./influxdb/config:/etc/influxdb2
environment:
- INFLUXD_LOG_LEVEL=error
- DOCKER_INFLUXDB_INIT_MODE=setup
- DOCKER_INFLUXDB_INIT_USERNAME=${INFLUXDB_USERNAME}
- DOCKER_INFLUXDB_INIT_PASSWORD=${INFLUXDB_PASSWORD}
- DOCKER_INFLUXDB_INIT_ORG=${INFLUXDB_ORG}
- DOCKER_INFLUXDB_INIT_BUCKET=${INFLUXDB_BUCKET}
- DOCKER_INFLUXDB_INIT_RETENTION=52w
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=${INFLUXDB_ADMIN_TOKEN}
mosquitto:
container_name: home-assistant-mqtt
image: eclipse-mosquitto:2.0.20
restart: unless-stopped
networks:
home-assistant:
aliases:
- mosquitto.home
ports:
- 1883:1883
healthcheck:
test: mosquitto_sub -p 1883 -C 1 -E -W 3 -i 'probe' -t 'ping'
interval: 20s
timeout: 5s
retries: 3
start_period: 20s
start_interval: 2s
user: "${UID}:${GID}"
volumes:
- ./mosquitto/config:/mosquitto/config
- ./mosquitto/data:/mosquitto/data
environment:
- TZ=${TZ}
zigbee2mqtt:
depends_on:
mosquitto:
condition: service_healthy
container_name: home-assistant-z2mqtt
image: koenkk/zigbee2mqtt:1.41.0
restart: unless-stopped
networks:
home-assistant-external:
home-assistant:
aliases:
- zigbee2mqtt.home
ports:
- 8080:8080
user: "${UID}:${GID}"
group_add:
- dialout
volumes:
- ./zigbee2mqtt/data:/app/data
environment:
- TZ=${TZ}
devices:
- ${ZIGBEE_USB_PATH}:/dev/ttyACM0
caddy:
depends_on:
- home-assistant
container_name: home-assistant-caddy
image: caddy:2.8.4-alpine
restart: unless-stopped
networks:
- home-assistant-external
- home-assistant
ports:
- 80:80
- 443:443
user: "${UID}:${GID}"
volumes:
- ./caddy/Caddyfile:/etc/caddy/Caddyfile
- ./caddy/data:/data
- ./caddy/config:/config
networks:
home-assistant:
name: home-assistant
internal: true
home-assistant-external:
name: home-assistant-external
driver: bridge