forked from 2023-Winter-Bootcamp-Team-J/NextPage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.monitoring.yml
134 lines (117 loc) · 3.13 KB
/
docker-compose.monitoring.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
version: '3'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.2
container_name: elasticsearch
environment:
- "discovery.type=single-node"
ports:
- "9200:9200"
networks:
- npage
logstash:
image: docker.elastic.co/logstash/logstash:7.10.2
container_name: logstash
volumes:
- ./backend/logging/:/logging/
- ./backend/logging/logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml
- ./backend/logging/logstash/pipeline:/usr/share/logstash/pipeline
ports:
- "5044:5044"
networks:
- npage
depends_on:
- elasticsearch
kibana:
image: docker.elastic.co/kibana/kibana:7.10.2
container_name: kibana
ports:
- "5601:5601"
networks:
- npage
depends_on:
- elasticsearch
filebeat:
image: docker.elastic.co/beats/filebeat:7.10.2
container_name: filebeat
volumes:
- ./backend/logging:/logging
- ./backend/logging/filebeat/filebeat.yml:/usr/share/filebeat/filebeat.yml:ro
- ./nginx/log:/var/log/nginx # nginx 로그를 호스트와 컨테이너 간에 공유
networks:
- npage
depends_on:
- logstash
command: filebeat -e -c /usr/share/filebeat/filebeat.yml --strict.perms=false
node_exporter:
image: prom/node-exporter:latest
container_name: node_exporter
command:
- '--path.rootfs=/host'
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
- --collector.filesystem.ignored-mount-points
- "^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)"
ports:
- "9100:9100"
networks:
- npage
restart: unless-stopped
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
prometheus:
image: prom/prometheus
container_name: prometheus
volumes:
- ./backend/data/prometheus/config/:/etc/prometheus/
- ./backend/data/prometheus/volume:/prometheus
ports:
- 9090:9090
command: # web.enalbe-lifecycle은 api 재시작없이 설정파일들을 reload 할 수 있게 해줌
- '--web.enable-lifecycle'
- '--config.file=/etc/prometheus/prometheus.yml'
restart: always
depends_on:
- backend
- cadvisor
user: "root:root"
networks:
- npage
grafana:
image: grafana/grafana:latest
container_name: grafana
environment:
- GRAFANA_DEFAULT_USER=admin
- GRAFANA_DEFAULT_PASS=nextpage
- GRAFANA_DEFAULT_VHOST=npage_host
depends_on:
- prometheus
links:
- prometheus
ports:
- "3000:3000"
volumes:
- ./backend/data/grafana:/var/lib/grafana
restart: always
user: "root:root"
networks:
- npage
cadvisor:
container_name: cadvisor
image: gcr.io/cadvisor/cadvisor:v0.45.0
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
ports:
- 8080:8080
networks:
- npage
restart: always
volumes:
nextpage-db:
networks:
npage: