-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
117 lines (117 loc) · 3.1 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
services:
homeassistant:
container_name: homeassistant
image: "ghcr.io/home-assistant/home-assistant:stable"
ports:
- "8123:8123"
volumes:
- ./conf_ha_configuration.yaml:/config/configuration.yaml
- /etc/localtime:/etc/localtime:ro
- /run/dbus:/run/dbus:ro
networks:
- homeassistant_network
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:8123"]
interval: 45s
timeout: 30s
retries: 3
depends_on:
mosquitto:
condition: service_healthy
restart: unless-stopped
privileged: true
mosquitto:
image: eclipse-mosquitto
restart: always
ports:
- "1883:1883"
- "9001:9001"
volumes:
- ./conf_mqtt_mosquitto.conf:/mosquitto/config/mosquitto.conf:ro
- mosquitto_data:/mosquitto/data
- mosquitto_log:/mosquitto/log
networks:
- homeassistant_network
healthcheck:
test: ["CMD", "mosquitto_sub", "-t", "$$SYS/#", "-C", "1", "-i", "docker_healthcheck", "-W", "3"]
interval: 30s
timeout: 10s
retries: 3
ecowitt2mqtt:
image: bachya/ecowitt2mqtt
restart: unless-stopped
ports:
- 4199:4199/udp
networks:
- homeassistant_network
environment:
- ECOWITT2MQTT_PORT=4199
- ECOWITT2MQTT_MQTT_BROKER=mosquitto
- ECOWITT2MQTT_MQTT_PORT=1883
- ECOWITT2MQTT_MQTT_TOPIC=weather/sainlogic
- ECOWITT2MQTT_HASS_DISCOVERY=true
depends_on:
mosquitto:
condition: service_healthy
influxdb:
image: influxdb:latest
volumes:
- ./conf_influxdb_influxdb.conf:/etc/influxdb/influxdb.conf:ro
- influxdb_data:/var/lib/influxdb2
ports:
- "8086:8086"
networks:
- homeassistant_network
environment:
- DOCKER_INFLUXDB_INIT_MODE=setup
- DOCKER_INFLUXDB_INIT_USERNAME=my-user
- DOCKER_INFLUXDB_INIT_PASSWORD=my-password
- DOCKER_INFLUXDB_INIT_ORG=my-org
- DOCKER_INFLUXDB_INIT_BUCKET=my-bucket
healthcheck:
test: "influx ping || exit 1"
interval: 60s
timeout: 10s
retries: 5
start_period: 20s
depends_on:
homeassistant:
condition: service_healthy
grafana:
image: grafana/grafana:latest
volumes:
- ./conf_grafana_grafana.ini:/etc/grafana/grafana.ini:ro
- ./conf_grafana_datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml:ro
- grafana_data:/var/lib/grafana
ports:
- "3000:3000"
networks:
- homeassistant_network
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=password
depends_on:
influxdb:
condition: service_healthy
weather_emulator:
build: ./weather_emulator
environment:
- MQTT_BROKER=mosquitto
- MQTT_PORT=1883
- MQTT_TOPIC=weather/sainlogic
- TEMP_MIN=-5
- TEMP_MAX=35
- UPDATE_FREQUENCY=15
networks:
- homeassistant_network
depends_on:
homeassistant:
condition: service_healthy
networks:
homeassistant_network:
driver: bridge
volumes:
mosquitto_data:
mosquitto_log:
influxdb_data:
grafana_data: