-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
173 lines (164 loc) · 4.8 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
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
161
162
163
164
165
166
167
168
169
170
171
172
173
version: '3.8'
services:
wireguard:
image: linuxserver/wireguard:latest
container_name: wireguard
cap_add:
- NET_ADMIN
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Dublin
- SERVERURL=vpn.dashford.dev
- SERVERPORT=52000
- PEERS=phone
- PEERDNS=auto
volumes:
- wgconfig:/config
- /lib/modules:/lib/modules
ports:
- 52000:51820/udp
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
restart: unless-stopped
homeassistant:
image: homeassistant/home-assistant:2024.12.4
container_name: homeassistant
network_mode: host
volumes:
- ./docker/homeassistant/configuration:/config
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
ports:
- 8123:8123
- 8124:8124
depends_on:
- homeassistant_db
- mosquitto
- zigbee2mqtt
mosquitto:
build:
context: ./docker/mosquitto
args:
- USERNAME=${MQTT_USER}
- PASSWORD=${MQTT_PASSWORD}
container_name: mosquitto
ports:
- 1883:1883
restart: unless-stopped
volumes:
- ./docker/mosquitto/configuration/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro
homeassistant_db:
image: postgres:15.3
container_name: homeassistant_db
environment:
- POSTGRES_PASSWORD=${HOMEASSISTANT_DB_PASSWORD}
- POSTGRES_DB=homeassistant
- POSTGRES_INITDB_ARGS="--encoding=UTF-8"
- TZ=Europe/Dublin
ports:
- 5432:5432
restart: unless-stopped
volumes:
- homeassistant_db:/var/lib/postgresql/data
grafana:
image: grafana/grafana:11.0.0
container_name: grafana
volumes:
- grafana:/data
- ./docker/grafana/configuration:/etc/grafana
- ./docker/grafana/dashboards/brompton:/var/lib/grafana/dashboards/brompton
- ./docker/grafana/dashboards/teslamate:/var/lib/grafana/dashboards/teslamate
network_mode: host
ports:
- 3000:3000
environment:
- GF_USERS_ALLOW_SIGN_UP=false
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD}
- GF_AUTH_DISABLE_LOGIN_FORM=false
- GF_INSTALL_PLUGINS=pr0ps-trackmap-panel 2.1.2,natel-plotly-panel 0.0.7
- INFLUXDB_HOST=${INFLUXDB_HOST}
- INFLUXDB_ADMIN_PASSWORD=${INFLUXDB_ADMIN_PASSWORD}
- INFLUXDB_ADMIN_TOKEN=${INFLUXDB_ADMIN_TOKEN}
- TESLAMATE_DB_HOST=${TESLAMATE_HOST}
- TESLAMATE_DB_PORT=5432
- TESLAMATE_DB_USER=teslamate
- TESLAMATE_DB_PASSWORD=${TESLAMATE_DB_PASSWORD}
- TESLAMATE_DB_NAME=teslamate
restart: unless-stopped
zigbee2mqtt:
image: koenkk/zigbee2mqtt:1.41.0
container_name: zigbee2mqtt
volumes:
- ./docker/zigbee2mqtt:/app/data
- /run/udev:/run/udev:ro
devices:
- /dev/ttyACM0
restart: unless-stopped
network_mode: host
environment:
- TZ=Europe/Dublin
- ZIGBEE2MQTT_DATA=/app/data
- ZIGBEE2MQTT_CONFIG_MQTT_USER=${MQTT_USER}
- ZIGBEE2MQTT_CONFIG_MQTT_PASSWORD=${MQTT_PASSWORD}
- ZIGBEE2MQTT_CONFIG_ADVANCED_NETWORK_KEY=${ZIGBEE2MQTT_NETWORK_KEY}
teslamate:
image: teslamate/teslamate:1.31.1
container_name: teslamate
restart: unless-stopped
environment:
- ENCRYPTION_KEY=${TESLAMATE_ENCRYPTION_KEY}
- DATABASE_USER=teslamate
- DATABASE_PASS=${TESLAMATE_DB_PASSWORD}
- DATABASE_NAME=teslamate
- DATABASE_HOST=10.243.0.100
- DATABASE_PORT=5433
- MQTT_HOST=mosquitto
- MQTT_USERNAME=${MQTT_USER}
- MQTT_PASSWORD=${MQTT_PASSWORD}
- TZ=Europe/Dublin
ports:
- "4000:4000"
depends_on:
- teslamate_db
teslamate_db:
image: postgres:15.3
container_name: teslamate_db
environment:
- POSTGRES_PASSWORD=${TESLAMATE_DB_PASSWORD}
- POSTGRES_DB=teslamate
- POSTGRES_USER=teslamate
- POSTGRES_INITDB_ARGS="--encoding=UTF-8"
- TZ=Europe/Dublin
ports:
- "5433:5432"
restart: unless-stopped
volumes:
- teslamate_db:/var/lib/postgresql/data
teslamateagile:
image: mattjeanes/teslamateagile:v1.16.0
container_name: teslamateagile
restart: unless-stopped
environment:
- DATABASE_USER=teslamate
- DATABASE_PASS=${TESLAMATE_DB_PASSWORD}
- DATABASE_NAME=teslamate
- DATABASE_HOST=10.243.0.100
- DATABASE_PORT=5433
- TeslaMate__UpdateIntervalSeconds=300
- TeslaMate__GeofenceId=1
- TeslaMate__EnergyProvider=HomeAssistant
- TeslaMate__LookbackDays=7
- HomeAssistant__BaseUrl=http://10.243.0.100:8123
- HomeAssistant__AccessToken=${TESLAMATE_AGILE_HOMEASSISTANT_TOKEN}
- HomeAssistant__EntityId=input_number.current_electricity_unit_price
volumes:
grafana:
driver: local
homeassistant_db:
driver: local
wgconfig:
driver: local
teslamate_db:
driver: local