-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
213 lines (193 loc) · 4.95 KB
/
compose.yaml
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
version: "3.3"
services:
app:
container_name: server-sent-events
hostname: server-sent-events
image: server-sent-events
stdin_open: true
tty: true
build:
context: .
dockerfile: Dockerfile
args:
END: 'TEST'
volumes:
- "/tmp:/tmp"
ports:
- '8080:8080'
restart: 'on-failure'
depends_on:
- fluentbit
- mysql
- kafka
- elasticsearch
- prometheus
logging:
driver: fluentd
options:
fluentd-address: fluentbit:24224
fluentd-async-connect: "true"
tag: 'containerssh.{{.ID}}'
environment:
- SLEEP_LENGTH=5
- spring.datasource.url=jdbc:mysql://mysql:3306/sse?useSSL=false&serverTimezone=UTC&useLegacyDatetimeCode=false&autoReconnect=true&allowPublicKeyRetrieval=true&createDatabaseIfNotExist=true
- spring.datasource.username=test
- spring.datasource.password=root1234
- spring.kafka.bootstrap-servers=kafka:9092
sonar:
image: sonarqube:7.9.5-community
depends_on:
- sonar-db
- init
environment:
SONAR_JDBC_URL: jdbc:postgresql://sonar-db:5432/sonar
SONAR_JDBC_USERNAME: sonartest
SONAR_JDBC_PASSWORD: sonartest
sonar.web.port: 9000
volumes:
- sonarqube_data:/opt/sonarqube/data
- sonarqube_extensions:/opt/sonarqube/extensions
- sonarqube_logs:/opt/sonarqube/logs
- sonarqube_temp:/opt/sonarqube/temp
ulimits:
nproc: 131072
nofile:
soft: 8192
hard: 131072
ports:
- "9017:9000"
init:
image: bash
privileged: true
user: root
volumes:
- ./sonarqube/init.sh:/mnt/init.sh <---- replace the path
command: [ "sh", "-e", "/mnt/init.sh" ]
sonar-db:
image: postgres:12
environment:
POSTGRES_USER: sonartest
POSTGRES_PASSWORD: sonartest
volumes:
- postgresql:/var/lib/postgresql
- postgresql_data:/var/lib/postgresql/data
fluentbit:
image: 'shubham01/sse-fluentbit:latest'
hostname: fluentbit
ports:
- "24224:24224"
- "24224:24224/udp"
volumes:
- ./fluentbit/fluent-bit.conf:/fluent-bit/etc/fluent-bit.conf
- ./fluentbit/parsers.conf:/fluent-bit/etc/parsers.conf
- ./log/:/etc/data
mysql:
image: 'mysql:latest'
environment:
- 'MYSQL_DATABASE=sse'
- 'MYSQL_PASSWORD=root1234'
- 'MYSQL_ROOT_PASSWORD=root1234'
- 'MYSQL_USER=test'
ports:
- '3306:3306'
zookeeper:
image: confluentinc/cp-zookeeper:latest
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ports:
- 22181:2181
kafka:
image: confluentinc/cp-kafka:latest
depends_on:
- zookeeper
ports:
- 9092:9092
- 29092:29092
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
kafdrop:
image: obsidiandynamics/kafdrop
restart: "no"
ports:
- "9000:9000"
environment:
KAFKA_BROKERCONNECT: "kafka:9092"
JVM_OPTS: "-Xms16M -Xmx48M -Xss180K -XX:-TieredCompilation -XX:+UseStringDeduplication -noverify"
depends_on:
- "kafka"
elasticsearch:
image: elasticsearch:8.9.1
ports:
- "9200:9200"
- "9300:9300"
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- discovery.type=single-node
prometheus:
image: prom/prometheus:v2.44.0
container_name: prometheus
ports:
- "9090:9090"
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
grafana:
image: grafana/grafana
container_name: grafana-server
restart: always
depends_on:
- prometheus
- influxdb
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_INSTALL_PLUGINS=
links:
- influxdb
ports:
- '3000:3000'
volumes:
- grafana_data:/var/lib/grafana
- ./grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
telegraf:
image: telegraf
container_name: telegraf
restart: always
volumes:
- ./telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro
depends_on:
- influxdb
- elasticsearch
links:
- influxdb
ports:
- '8125:8125'
influxdb:
image: influxdb:1.8-alpine
container_name: influxdb
restart: always
environment:
- INFLUXDB_DB=influx
- INFLUXDB_ADMIN_USER=admin
- INFLUXDB_ADMIN_PASSWORD=admin
ports:
- '8086:8086'
volumes:
- influxdb_data:/var/lib/influxdb
volumes:
grafana_data: { }
influxdb_data: { }
sonarqube_data:
sonarqube_extensions:
sonarqube_logs:
sonarqube_temp:
postgresql:
postgresql_data:
networks:
sse:
external: true