This repository has been archived by the owner on Dec 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose-tick.yml
266 lines (253 loc) · 7.12 KB
/
docker-compose-tick.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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
version: '3'
services:
zookeeper:
image: wurstmeister/zookeeper
networks:
smartfarm_net:
ipv4_address: 172.16.238.10
ports:
- "2181:2181"
logging:
driver: gelf
options:
gelf-address: udp://172.16.238.51:12201
tag: "staging"
links:
- logstash:logstash
depends_on:
- logstash
kafka:
image: wurstmeister/kafka
networks:
smartfarm_net:
ipv4_address: 172.16.238.11
ports:
- "9092:9092"
environment:
KAFKA_ADVERTISED_PORT: 9092
KAFKA_ADVERTISED_HOST_NAME: 172.16.238.11
KAFKA_ZOOKEEPER_CONNECT: 172.16.238.10:2181
volumes:
- /var/run/docker.sock:/var/run/docker.sock
links:
logging:
driver: gelf
options:
gelf-address: udp://172.16.238.51:12201
tag: "staging"
links:
- logstash:logstash
- zookeeper
depends_on:
- logstash
postgredb:
image: postgres
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: smartfarm
networks:
smartfarm_net:
ipv4_address: 172.16.238.12
ports:
- "5432:5432"
logging:
driver: gelf
options:
gelf-address: udp://172.16.238.51:12201
tag: "staging"
links:
- logstash:logstash
depends_on:
- logstash
mongo:
image: 'mongo:latest'
networks:
smartfarm_net:
ipv4_address: 172.16.238.15
ports:
- 27017:27017
logging:
driver: gelf
options:
gelf-address: udp://172.16.238.51:12201
tag: "staging"
links:
- logstash:logstash
depends_on:
- logstash
tomcat:
image: tomcat
restart: always
networks:
smartfarm_net:
ipv4_address: 172.16.238.20
ports:
- "8080:8080"
environment:
- kafka_bootstrap_servers=172.16.238.11:9092
- datasource_postgres_alerts=jdbc:postgresql://172.16.238.12:5432/
- datasource_postgres=jdbc:postgresql://172.16.238.12:5432/
- datasource_postgres_triggered_alerts=jdbc:postgresql://172.16.238.12:5432/
- datasource_username=postgres
- datasource_password=postgres
- mongo_host=172.16.238.15
volumes:
- "./service-layer/target/ServiceLayer-0.0.1-SNAPSHOT.war:/usr/local/tomcat/webapps/ROOT.war"
- "./service-layer/target/ServiceLayer-0.0.1-SNAPSHOT:/usr/local/tomcat/webapps/ROOT"
- "./long-term-persistence/target/LongTermPersistence-0.0.1-SNAPSHOT.war:/usr/local/tomcat/webapps/persistence.war"
- "./alerts-management/target/AlertsManagement-0.0.1-SNAPSHOT.war:/usr/local/tomcat/webapps/alerts.war"
- "./alerts-management/target/AlertsManagement-0.0.1-SNAPSHOT:/usr/local/tomcat/webapps/alerts"
- "./triggered-alerts/target/TriggeredAlerts-0.0.1-SNAPSHOT.war:/usr/local/tomcat/webapps/triggeredalerts.war"
- "./triggered-alerts/target/TriggeredAlerts-0.0.1-SNAPSHOT:/usr/local/tomcat/webapps/triggeredalerts"
depends_on:
- kafka
- mongo
- postgredb
nginx_proxy:
image: nginx
networks:
smartfarm_net:
ipv4_address: 172.16.238.30
ports:
- "8000:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
command: [nginx, '-g', 'daemon off;']
logging:
driver: gelf
options:
gelf-address: udp://172.16.238.51:12201
tag: "staging"
links:
- logstash:logstash
depends_on:
- logstash
- tomcat
dashboard:
build:
context: ./dashboard
dockerfile: Dockerfile
volumes:
- './dashboard:/usr/src/app'
- '/usr/src/app/node_modules'
networks:
smartfarm_net:
ipv4_address: 172.16.238.40
ports:
- '3000:3000'
environment:
- NODE_ENV=development
depends_on:
- nginx_proxy
- logstash
logging:
driver: gelf
options:
gelf-address: udp://172.16.238.51:12201
tag: "staging"
links:
- logstash:logstash
elasticsearch:
build:
context: elasticsearch/
volumes:
- ./elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro
ports:
- "9200:9200"
- "9300:9300"
networks:
smartfarm_net:
ipv4_address: 172.16.238.50
logstash:
build:
context: logstash/
volumes:
- ./logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml:ro
- ./logstash/pipeline:/usr/share/logstash/pipeline:ro
ports:
- "5000:5000"
- "12201:12201/udp"
networks:
smartfarm_net:
ipv4_address: 172.16.238.51
depends_on:
- elasticsearch
kibana:
build:
context: kibana/
volumes:
- ./kibana/config/:/usr/share/kibana/config:ro
ports:
- "5601:5601"
networks:
smartfarm_net:
ipv4_address: 172.16.238.52
depends_on:
- elasticsearch
# Define a Telegraf service
telegraf:
image: telegraf:1.4.0
volumes:
- ./etc/telegraf.conf:/etc/telegraf/telegraf.conf:ro
links:
- influxdb
ports:
- "8092:8092/udp"
- "8094:8094"
- "8125:8125/udp"
# Define an InfluxDB service
influxdb:
image: influxdb:1.3.5
volumes:
- ./data/influxdb:/var/lib/influxdb
ports:
- "8086:8086"
# Define a Chronograf service
chronograf:
image: chronograf:1.3.8
environment:
INFLUXDB_URL: http://influxdb:8086
KAPACITOR_URL: http://kapacitor:9092
ports:
- "8888:8888"
links:
- influxdb
- kapacitor
# Define a Kapacitor service
kapacitor:
image: kapacitor:1.3.3
environment:
KAPACITOR_HOSTNAME: kapacitor
KAPACITOR_INFLUXDB_0_URLS_0: http://influxdb:8086
links:
- influxdb
ports:
- "9095:9092"
# Define a service for using the influx CLI tool.
# docker-compose run influxdb-cli
influxdb-cli:
image: influxdb:1.3.5
entrypoint:
- influx
- -host
- influxdb
links:
- influxdb
# Define a service for using the kapacitor CLI tool.
# docker-compose run kapacitor-cli
kapacitor-cli:
image: kapacitor:1.3.3
entrypoint: bash
environment:
KAPACITOR_URL: http://kapacitor:9092
links:
- kapacitor
networks:
smartfarm_net:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.16.238.0/24