-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
215 lines (158 loc) · 5.06 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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
version: "3.7"
networks:
frontend:
backend:
services:
# -----------------------------------------------------------------
# Reverse Proxy
traefik:
image: traefik:v2.6
container_name: "traefik"
restart: unless-stopped
networks:
- frontend
- backend
ports:
- 80:80
- 443:443
volumes:
# Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock:ro
# Define Time
- /etc/localtime:/etc/localtime:ro
# Configuration
- ./devops/traefik/traefik.toml:/etc/traefik/traefik.toml:ro
- ./devops/traefik/traefik_dynamic.toml:/etc/traefik/traefik_dynamic.toml:ro
# Data Storage
- ./data/traefik/acme.json:/acme.json
# -----------------------------------------------------------------
# Mosquitto
# mqtt.bee.espertamente.com.br
mosquitto:
image: eclipse-mosquitto:latest
restart: always
container_name: "mosquitto"
networks:
- backend
ports:
- 1883:1883
volumes:
# Configuration
- ./devops/mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro
- ./devops/mosquitto/mosquitto.passwd:/mosquitto/config/mosquitto.passwd:ro
# Data Storage
- ./data/mosquitto/data:/mosquitto/data
# Log Storage
- ./data/mosquitto/log:/mosquitto/log
# -----------------------------------------------------------------
# InfluxDB
# influxdb.bee.espertamente.com.br
influxdb:
image: influxdb:latest
container_name: "influxdb"
restart: always
networks:
- frontend
- backend
ports:
- 8086:8086
environment:
- DOCKER_INFLUXDB_INIT_MODE=setup
- DOCKER_INFLUXDB_INIT_USERNAME=espertamente
- DOCKER_INFLUXDB_INIT_PASSWORD=Iy03yxMzFrahYBv2TBIn
- DOCKER_INFLUXDB_INIT_ORG=espertamente
- DOCKER_INFLUXDB_INIT_BUCKET=bee
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=WCHiXnonzowflQRsO7QM
volumes:
# Configuration
# - ./devops/influxdb:/etc/influxdb2
# Data Storage
- ./data/influxdb:/var/lib/influxdb2
labels:
- "traefik.enable=true"
- "traefik.http.routers.influxdb.rule=Host(`influxdb.bee.espertamente.com.br`)"
- "traefik.http.routers.influxdb.entrypoints=websecure"
- "traefik.http.services.influxdb.loadbalancer.server.port=8086"
- "traefik.http.routers.influxdb.service=influxdb"
- "traefik.http.routers.influxdb.tls.certresolver=letsencrypt"
# -----------------------------------------------------------------
# Telegraf
telegraf:
image: telegraf:latest
container_name: "telegraf"
restart: always
networks:
- backend
ports:
- 8125:8125
volumes:
# Configuration
- ./devops/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- influxdb
links:
- influxdb
environment:
- DOCKER_INFLUXDB_INIT_ORG=espertamente
- DOCKER_INFLUXDB_INIT_BUCKET=bee
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=WCHiXnonzowflQRsO7QM
labels:
- "traefik.enable=false"
# -----------------------------------------------------------------
# NodeRED
# nodered.bee.espertamente.com.br
nodered:
image: nodered/node-red:latest
restart: unless-stopped
container_name: nodered
networks:
- frontend
- backend
user: root:root
environment:
- TZ=America/Sao_Paulo
# - NODE_RED_ENABLE_PROJECTS=true
# - NODE_RED_CREDENTIAL_SECRET=$apr1$GCd5TkKn$PZvSTWH7UkvkszmYSaNUI/
volumes:
# Define Time
- /etc/localtime:/etc/localtime:ro
# Configuration
- ./devops/nodered/settings.js:/data/settings.js
- ./devops/nodered/public_html:/data/public_html
# data Storage
- ./data/nodered:/data
labels:
- "traefik.enable=true"
- "traefik.http.routers.nodered.rule=Host(`nodered.bee.espertamente.com.br`)"
- "traefik.http.routers.nodered.entrypoints=websecure"
- "traefik.http.services.nodered.loadbalancer.server.port=1880"
- "traefik.http.routers.nodered.service=nodered"
- "traefik.http.routers.nodered.tls.certresolver=letsencrypt"
# -----------------------------------------------------------------
# Node
node_custom:
image: node_custom:1.0.0
container_name: node_custom
build:
context: .
dockerfile: ./devops/node_custom/Dockerfile
restart: always
user: root
working_dir: /home/node/app
networks:
- frontend
- backend
volumes:
- ./software/userinterface:/home/node/app
#ports:
# - "8080:8080"
# this is related to the line 7 of package.json
command: "npm start"
labels:
- "traefik.enable=true"
- "traefik.http.routers.node_custom.rule=Host(`bee.espertamente.com.br`)"
- "traefik.http.routers.node_custom.entrypoints=websecure"
- "traefik.http.services.node_custom.loadbalancer.server.port=8080"
- "traefik.http.routers.node_custom.service=node_custom"
- "traefik.http.routers.node_custom.tls.certresolver=letsencrypt"