-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-env.yaml
201 lines (198 loc) · 4.55 KB
/
docker-compose-env.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
#collect the file which contains the log data which is created by server or nginx config
## elasticsearch version: 7.17.8
## kibana version : 7.17.0
## filebeat version: 7.17.8
## zookeeper version: 3.8.0
## kafka version: 3.3.1
## go-stash version:1.0.8
## Prometheus version:2.41.0
## grafana version:9.3.2
## jaeger version: 1.41.0
# log collect container
version: "3"
services:
filebeat:
image: elastic/filebeat:7.17.8
container_name: filebeat
environment:
TZ: Asia/Shanghai
restart: always
user: root
entrypoint: "filebeat -e -strict.perms=false" #解决配置文件权限问题
volumes:
- ./deploy/filebeat/conf/filebeat.yml:/usr/share/filebeat/filebeat.yml
- /var/lib/docker/containers:/var/lib/docker/containers
networks:
- cloudStorageSystem
depends_on:
- kafka
go-stash:
image: kevinwan/go-stash:1.0.8
container_name: go-stash
environment:
- TZ=Asia/Shanghai
restart: always
volumes:
- ./deploy/go-stash/etc:/app/etc
networks:
- cloudStorageSystem
depends_on:
- elasticsearch
- kafka
elasticsearch:
image: elasticsearch:7.17.8
container_name: elasticsearch
environment:
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- TZ=Asia/Shanghai
volumes:
- ./data/elasticsearch/data:/use/share/elasticsearch/data
restart: always
ports:
- 9200:9300
- 9300:9300
networks:
- cloudStorageSystem
kibana:
image: kibana:7.17.8
container_name: kibana
environment:
- elasticsearch.hosts:http://elasticsearch:9200
- TZ=Asia/Shanghai
restart: always
networks:
- cloudStorageSystem
ports:
- 5601:5601
depends_on:
- elasticsearch
zookeeper:
image: zookeeper:3.8.0
container_name: zookeeper
environment:
TZ: Asia/Shanghai
restart: always
ports:
- 2181:2181
networks:
- cloudStorageSystem
kafka:
image: bitnami/kafka:3.3.1
container_name: kafka
ports:
- 9092:9092
environment:
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_ADVERTISED_HOST_NAME=kafka
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
- KAFKA_AUTO_CREATE_TOPICS_ENABLE=false
- TZ=Asia/Shanghai
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker/sock
networks:
- cloudStorageSystem
depends_on:
- zookeeper
# Prometheus
Prometheus:
image: bitnami/prometheus:2.41.0
container_name: Prometheus
environment:
TZ: Asia/Shanghai
user: root
volumes:
- ./deploy/prometheus/server/prometheus.yml:/etc/prometheus/prometheus.yml
- ./data/prometheus/data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
restart: always
ports:
- 9090:9090
networks:
- cloudStorageSystem
grafana:
image: grafana/grafana:9.3.2
container_name: grafana
hostname: grafana
environment:
TZ: Asia/Shanghai
user: root
restart: always
volumes:
- ./data/grafana/data:/var/lib/grafana
ports:
- 3001:3001
networks:
- cloudStorageSystem
# linktrace
jaeger:
image: jaegertracing/all-in-one:1.41.0
container_name: jaeger
restart: always
ports:
- "5775:5775/udp"
- "6831:6831/udp"
- "6832:6832/udp"
- "5778:5778"
- "16686:16686"
- "14268:14268"
- "9411:9411"
environment:
- SPAN_STORAGE_TYPE=elasticsearch
- ES_SERVER_URLS=http://elasticsearch:9200
- LOG_LEVEL=debug
networks:
- cloudStorageSystem
etcd:
image: bitnami/etcd:3.5
container_name: etcd
hostname: etcd
restart: always
environment:
- ALLOW_NONE_AUTHENTICATION=yes
ports:
- "2379:2379"
networks:
- cloudStorageSystem
mysql:
image: mysql/mysql-server:8.0.28
restart: always
container_name: mysql
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: root
TZ: Asia/Shanghai
volumes:
- ./deploy/DB/mysql/:/docker-entrypoint-initdb.d/
- ./data/mysql/data:/var/lib/mysql
command:
--default-authentication-plugin=mysql_native_password
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
--explicit_defaults_for_timestamp=true
--lower_case_table_names=1
privileged: true
networks:
- cloudStorageSystem
redis:
image: redis:6.2.5
container_name: redis
ports:
- "6379:6379"
restart: always
volumes:
- ./data/redis/data:/data:rw
command: "redis-server --requirepass root --appendonly yes"
privileged: true
networks:
- cloudStorageSystem
networks:
cloudStorageSystem:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16