-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.example.yaml
150 lines (138 loc) · 3.41 KB
/
docker-compose.example.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
version: '3.1'
services:
db:
image: mysql:8.0
restart: always
environment:
MYSQL_DATABASE: java_web
MYSQL_USER: java_web
MYSQL_PASSWORD: java_web
MYSQL_RANDOM_ROOT_PASSWORD: yes
volumes:
- ./deploy/sql/init.sql:/docker-entrypoint-initdb.d/init.sql
- ./custom/data/mysql/data:/var/lib/mysql
ports:
- 3306:3306
networks:
- java-web
redis:
image: redis/redis-stack:7.2.0-v2
restart: always
ports:
- 6379:6379
- 8001:8001
environment:
REDISEARCH_ARGS: "MAXSEARCHRESULTS 5"
networks:
- java-web
prometheus:
image: prom/prometheus
restart: always
ports:
- 9090:9090
volumes:
- ./deploy/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
networks:
- java-web
grafana:
image: grafana/grafana
restart: always
ports:
- 3000:3000
volumes:
- ./custom/grafana-storage:/var/lib/grafana
networks:
- java-web
mysqld-exporter:
image: prom/mysqld-exporter
restart: always
ports:
- 9104:9104
volumes:
- ./deploy/mysql_exporter/my.cnf:/.my.cnf
networks:
- java-web
environment:
DATA_SOURCE_NAME: "java_web:java_web@tcp(db:3306)/java_web"
redis-exporter:
image: oliver006/redis_exporter
restart: always
ports:
- 9121:9121
networks:
- java-web
command:
- '--redis.addr=redis://redis:6379'
- '--redis.password='
es:
image: elasticsearch:7.17.21
container_name: es
environment:
- TZ=Asia/Shanghai
- ES_JAVA_OPTS=-Xms512m -Xmx512m
- discovery.type=single-node
volumes:
- ./custom/data/elasticsearch/data:/usr/share/elasticsearch/data
- ./custom/data/elasticsearch/plugins:/usr/share/elasticsearch/plugins
ports:
- "9200:9200"
- "9300:9300"
networks:
- java-web
kibana:
image: kibana:7.17.21
container_name: kibana
environment:
- TZ=Asia/Shanghai
- ELASTICSEARCH_HOSTS=http://es:9200
volumes:
- ./deploy/kibana/kibana.yml:/usr/share/kibana/config/kibana.yml
ports:
- "5601:5601"
depends_on:
- es
networks:
- java-web
logstash:
image: logstash:7.17.21
container_name: logstash
environment:
- TZ=Asia/Shanghai
volumes:
- ./deploy/logstash/logstash.conf:/usr/share/logstash/pipeline/logstash.conf
- ./deploy/logstash/logstash.yml:/usr/share/logstash/config/logstash.yml
ports:
- "5044:5044"
depends_on:
- es
networks:
- java-web
kafka:
image: bitnami/kafka
container_name: kafka
environment:
- TZ=Asia/Shanghai
- KAFKA_CFG_NODE_ID=0
- KAFKA_CFG_PROCESS_ROLES=controller,broker
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
- KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=0@kafka:9093
- KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
ports:
- "9092:9092"
networks:
- java-web
filebeat:
image: elastic/filebeat:7.17.21
container_name: filebeat
environment:
- TZ=Asia/Shanghai
volumes:
- ./deploy/filebeat/filebeat.yml:/usr/share/filebeat/filebeat.yml
- ./logs:/usr/share/filebeat/logs
command: filebeat -e -strict.perms=false
networks:
- java-web
networks:
java-web:
driver: bridge