-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
236 lines (221 loc) · 6.82 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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
version: '3.9'
services:
mosquitto:
build: ./config/mosquitto
volumes:
- mosquitto-storage:/mosquitto/data
networks:
- internal
ports:
- 1883:1883
- 9001:9001
restart: always
influxdb:
image: influxdb:2.3.0
ports:
- '8086:8086'
volumes:
- influxdb-storage:/var/lib/influxdb
networks:
- internal
environment:
- DOCKER_INFLUXDB_INIT_MODE=setup
- DOCKER_INFLUXDB_INIT_ORG=${INFLUXDB_ORG}
- DOCKER_INFLUXDB_INIT_BUCKET=${INFLUXDB_BUCKET}
- DOCKER_INFLUXDB_INIT_USERNAME=${INFLUXDB_USERNAME}
- DOCKER_INFLUXDB_INIT_PASSWORD=${INFLUXDB_PASSWORD}
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=${INFLUXDB_ADMIN_TOKEN}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8086/ping"]
interval: 30s
timeout: 10s
retries: 5
start_period: 40s
restart: always
grafana:
image: grafana/grafana:9.0.4
ports:
- '3333:3000'
volumes:
- grafana-storage:/var/lib/grafana
- ./config/grafana/provisioning/:/etc/grafana/provisioning
networks:
- internal
depends_on:
- influxdb
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_USERNAME}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_SECURITY_ALLOW_EMBEDDING=true
- GF_SECURITY_COOKIE_SAMESITE=false
- GF_SERVER_ROOT_URL=%(protocol)s://%(domain)s:%(http_port)s/grafana/
- GF_SERVER_SERVE_FROM_SUB_PATH=true
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]
interval: 30s
timeout: 10s
retries: 5
start_period: 40s
restart: always
mongo:
image: mongo:5.0.9
restart: always
environment:
- MONGO_INITDB_ROOT_USERNAME=${MONGO_USERNAME}
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_PASSWORD}
- MONGO_INITDB_DATABASE=${MONGO_DB_NAME}
networks:
- internal
volumes:
- mongodb-storage:/data/db
ports:
- 27017:27017
mongo-express:
image: mongo-express:0.54.0
restart: always
ports:
- 8081:8081
environment:
- ME_CONFIG_MONGODB_ADMINUSERNAME=${MONGO_USERNAME}
- ME_CONFIG_MONGODB_ADMINPASSWORD=${MONGO_PASSWORD}
- ME_CONFIG_MONGODB_SERVER=mongo
- ME_CONFIG_MONGODB_ENABLE_ADMIN=true
- ME_CONFIG_BASICAUTH_USERNAME=${EXPRESS_USERNAME}
- ME_CONFIG_BASICAUTH_PASSWORD=${EXPRESS_PASSWORD}
networks:
- internal
depends_on:
- mongo
proxy:
build: ./src/proxy
ports:
- "8082:8082"
- "9090:9090/udp"
environment:
- INFLUX_HOST=influxdb
- INFLUXDB_PORT=8086
- INFLUXDB_ORG=${INFLUXDB_ORG}
- INFLUXDB_BUCKET=${INFLUXDB_BUCKET}
- INFLUX_TOKEN=${INFLUXDB_ADMIN_TOKEN}
- MQTT_USERNAME=${MOSQUITTO_USERNAME}
- MQTT_PASSWORD=${MOSQUITTO_PASSWORD}
- MQTT_HOST=mosquitto
- MQTT_PORT=1883
- MONGO_USERNAME=${MONGO_USERNAME}
- MONGO_PASSWORD=${MONGO_PASSWORD}
- MONGO_DB_NAME=${MONGO_DB_NAME}
- MONGO_HOST=mongo
- MONGO_PORT=27017
restart: always
networks:
- internal
depends_on:
- mongo
- influxdb
- mosquitto
lomoapi:
build: ./src/api_server
ports:
- "8888:8888"
environment:
- GRAFANA_HOST=grafana
- GRAFANA_PORT=3000
- GRAFANA_USER=${GRAFANA_USERNAME}
- GRAFANA_PASS=${GRAFANA_PASSWORD}
- MQTT_USERNAME=${MOSQUITTO_USERNAME}
- MQTT_PASSWORD=${MOSQUITTO_PASSWORD}
- MQTT_HOST=mosquitto
- MONGO_USERNAME=${MONGO_USERNAME}
- MONGO_PASSWORD=${MONGO_PASSWORD}
- MONGO_DB_NAME=${MONGO_DB_NAME}
- MONGO_HOST=mongo
- TELEGRAM_HOST=telegram:8087
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8888/"]
interval: 60s
timeout: 10s
retries: 5
start_period: 40s
restart: always
networks:
- internal
depends_on:
- mongo
- grafana
- influxdb
- mosquitto
telegram:
build: ./src/telegram
ports:
- "8087:8087"
environment:
- LOMO_API_HOST=lomoapi:8888
- TELEGRAM_TOKEN=${TELEGRAM_API_KEY}
- MONGO_USERNAME=${MONGO_USERNAME}
- MONGO_PASSWORD=${MONGO_PASSWORD}
- MONGO_DB_NAME=${MONGO_DB_NAME}
- MONGO_HOST=mongo
- MONGO_PORT=27017
restart: always
networks:
- internal
depends_on:
- mongo
- lomoapi
weather:
build: ./src/weather
environment:
- INFLUX_HOST=influxdb
- INFLUXDB_PORT=8086
- INFLUXDB_ORG=${INFLUXDB_ORG}
- INFLUXDB_BUCKET=${INFLUXDB_BUCKET}
- INFLUX_TOKEN=${INFLUXDB_ADMIN_TOKEN}
- MONGO_USERNAME=${MONGO_USERNAME}
- MONGO_PASSWORD=${MONGO_PASSWORD}
- MONGO_DB_NAME=${MONGO_DB_NAME}
- MONGO_HOST=mongo
- MONGO_PORT=27017
- API_KEY=${WEATHER_API_KERY}
- SLEEP_TIME=1200
restart: always
networks:
- internal
depends_on:
- mongo
- influxdb
forecast:
build: ./src/forecast
environment:
- INFLUX_HOST=influxdb
- INFLUXDB_PORT=8086
- INFLUXDB_ORG=${INFLUXDB_ORG}
- INFLUXDB_BUCKET=${INFLUXDB_BUCKET}
- INFLUX_TOKEN=${INFLUXDB_ADMIN_TOKEN}
- MONGO_USERNAME=${MONGO_USERNAME}
- MONGO_PASSWORD=${MONGO_PASSWORD}
- MONGO_DB_NAME=${MONGO_DB_NAME}
- MONGO_HOST=mongo
- MONGO_PORT=27017
- SLEEP_TIME=30
restart: always
networks:
- internal
depends_on:
- mongo
- influxdb
https_proxy:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
- '80:80'
- '81:81'
- '443:443'
volumes:
influxdb-storage:
grafana-storage:
mosquitto-storage:
mongodb-storage:
networks:
internal:
name: internal-net