-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
109 lines (101 loc) · 2.57 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
version: '3.4'
services:
influxdb:
container_name: influxdb
image: influxdb
ports:
- 8886:8086
volumes:
- influxdb-data:/var/lib/influxdb
env_file:
- .env
environment:
- VIRTUAL_HOST=${INFLUXDB_HOST}
- VIRTUAL_PORT=8086
- LETSENCRYPT_HOST=${INFLUXDB_HOST}
- LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
- INFLUXDB_HTTP_AUTH_ENABLED=true
- INFLUXDB_DB=${INFLUXDB_DB}
- INFLUXDB_ADMIN_USER=${INFLUXDB_ADMIN_USER}
- INFLUXDB_ADMIN_PASSWORD=${INFLUXDB_ADMIN_PASSWORD}
- INFLUXDB_USER=${INFLUXDB_USER}
- INFLUXDB_USER_PASSWORD=${INFLUXDB_USER_PASSWORD}
- INFLUXDB_READ_USER=${INFLUXDB_READ_USER}
- INFLUXDB_READ_USER_PASSWORD=${INFLUXDB_READ_USER_PASSWORD}
- INFLUXDB_WRITE_USER=${INFLUXDB_WRITE_USER}
- INFLUXDB_WRITE_USER_PASSWORD=${INFLUXDB_WRITE_USER_PASSWORD}
- INFLUXDB_REPORTING_DISABLED=true
restart: always
networks:
default:
aliases:
- ${CONTAINER_NAMESPACE}influxdb
telegraf:
container_name: telegraf
image: telegraf
hostname: telegraf
env_file:
- .env
volumes:
- /var/run/docker.sock:/var/run/docker.sock
restart: always
depends_on:
- influxdb
networks:
- default
command: -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d
grafana:
container_name: grafana
image: grafana/grafana
user: "0"
env_file:
- .env
environment:
- VIRTUAL_HOST=${GRAFANA_HOST}
- VIRTUAL_PORT=3000
- LETSENCRYPT_HOST=${GRAFANA_HOST}
- LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
volumes:
- grafana-data:/var/lib/grafana
links:
- influxdb
restart: always
networks:
default:
aliases:
- ${CONTAINER_NAMESPACE}grafana
mqtt:
container_name: mqtt
image: eclipse-mosquitto:latest
user: "0"
volumes:
- mqtt-data:/mosquitto/data
- ${LETSENCRYPT_CERT_ROOT_PATH}/${MQTT_HOST}:/etc/ssl/${MQTT_HOST}:ro
ports:
- 9883:8883
env_file:
- .env
environment:
- VIRTUAL_HOST=${MQTT_HOST}
- VIRTUAL_PORT=1883
- LETSENCRYPT_HOST=${MQTT_HOST}
- LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
restart: always
networks:
default:
aliases:
- ${CONTAINER_NAMESPACE}mqtt
networks:
default:
external:
name: nginx-proxy
volumes:
influxdb-data:
driver: local
name: influxdb-data
grafana-data:
driver: local
name: grafana-data
mqtt-data:
driver: local
name: mqtt-data