-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
144 lines (131 loc) · 4.75 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
version: '3.3'
services:
nginx:
image: nginx
restart: always
ports:
- 80:80
- 443:443
volumes:
- ${PRIVATE_KEY_PATH}:/etc/ssl/private/nginx-selfsigned.key
- ${CERT_PATH}:/etc/ssl/certs/nginx-selfsigned.crt
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/html:/usr/share/nginx/html
depends_on:
- node_red
mosquitto:
image: mosquitto
restart: always
ports:
- 1883:1883
volumes:
- ./mosquitto/wordpassfile.txt:/mosquitto/config/wordpassfile.txt
- ./mosquitto/acl_file.txt:/mosquitto/config/acl_file.txt
- ./mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf
- ./mosquitto/mosquitto.log:/mosquitto/log/mosquitto.log
node_red:
image: node_red
user: root
restart: always
ports:
- 1880:1880
environment:
MDML_NODE_RED_PASS: "${MDML_NODE_RED_PASS}"
volumes:
- ./node_red/data:/data
depends_on:
- influxdb
- mosquitto
influxdb:
image: influxdb
restart: always
ports:
- 8086:8086
environment:
INFLUXDB_DB: "merf"
INFLUXDB_HTTP_AUTH_ENABLED: "true"
INFLUXDB_ADMIN_USER: "admin"
INFLUXDB_ADMIN_PASSWORD: "${MDML_INFLUXDB_SECRET}"
INFLUXDB_COORDINATOR_WRITE_TIMEOUT: "60s"
volumes:
- ./influxdb/lib:/var/lib/influxdb
sys_influxdb:
image: influxdb
restart: always
ports:
- 8087:8087
environment:
INFLUXDB_HTTP_BIND_ADDRESS: ":8087"
INFLUXDB_DB: "merf"
INFLUXDB_HTTP_AUTH_ENABLED: "true"
INFLUXDB_ADMIN_USER: "admin"
INFLUXDB_ADMIN_PASSWORD: "${MDML_INFLUXDB_SECRET}"
volumes:
- ./sys_influxdb/lib:/var/lib/influxdb
minio:
image: minio
restart: always
ports:
- 9000:9000
environment:
MINIO_ACCESS_KEY: "admin"
MINIO_SECRET_KEY: "${MDML_MINIO_SECRET}"
volumes:
- ./minio/mnt/data:/data
grafana:
image: grafana
restart: always
user: root
ports:
- 3000:3000
environment:
GF_SERVER_PROTOCOL: "https"
GF_SERVER_HTTP_ADDR: "0.0.0.0"
GF_SERVER_DOMAIN: "${MDML_HOST}"
GF_SERVER_ROOT_URL: "https://${MDML_HOST}/grafana/"
GF_SERVER_CERT_FILE: "/etc/ssl/certs/nginx-selfsigned.crt"
GF_SERVER_CERT_KEY: "/etc/ssl/nginx-selfsigned.key"
GF_SECURITY_ADMIN_PASSWORD: "${MDML_GRAFANA_SECRET}"
GF_DATABASE_URL: "mysql://root:${MDML_GRAFDB_ROOT_SECRET}@grafana_mysqldb:3306/grafana"
GF_INSTALL_PLUGINS: "ryantxu-ajax-panel,natel-plotly-panel,bessler-pictureit-panel,larona-epict-panel"
volumes:
- ${PRIVATE_KEY_PATH}:/etc/ssl/nginx-selfsigned.key
- ${CERT_PATH}:/etc/ssl/certs/nginx-selfsigned.crt
depends_on:
- grafana_mysqldb
- influxdb
grafana_mysqldb:
image: grafana_mysqldb
restart: always
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: "${MDML_GRAFDB_ROOT_SECRET}"
MYSQL_DATABASE: "grafana"
MYSQL_USER: "grafana"
MYSQL_PASSWORD: "${MDML_GRAFDB_SECRET}"
volumes:
- ./grafana_mysqldb/data:/var/lib/mysql
register_account:
image: register_account
command: go run /root/register_mdml_user.go
restart: always
ports:
- 8184:8184
environment:
HOSTNAME: "${MDML_HOST}"
MDML_GRAFANA_SECRET: "${MDML_GRAFANA_SECRET}"
volumes:
- ./mdml_register/MinIO_policies:/root/MinIO_policies
- ./mdml_register/register_mdml_user.go:/root/register_mdml_user.go
- ./mdml_register/add_mqtt_acl.sh:/root/add_mqtt_acl.sh
- ./mdml_register/create_minio_bucket.py:/root/create_minio_bucket.py
- ./mdml_register/config.json:/root/.mc/config.json
- ./mosquitto/wordpassfile.txt:/etc/mosquitto/wordpassfile.txt
- ./mosquitto/acl_file.txt:/etc/mosquitto/acl_file.txt
- ./mosquitto/mosquitto.conf:/etc/mosquitto/mosquitto.conf
- ${PRIVATE_KEY_PATH}:/etc/ssl/nginx-selfsigned.key
- ${CERT_PATH}:/etc/ssl/certs/nginx-selfsigned.crt
depends_on:
- nginx
- grafana_mysqldb