Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
76 lines (70 loc) · 2.1 KB
/
Copy pathdocker-compose.yml
File metadata and controls
76 lines (70 loc) · 2.1 KB
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
#version: '3.8'
services:
fastapi:
image: ${NCP_REGISTRY}/smishing-backend:latest
container_name: smishing-api
restart: always
ports:
- "8000:8000"
env_file:
- .env
nginx:
image: nginx:alpine
container_name: nginx-proxy
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
- ./frontend/web_mvp/dist:/usr/share/nginx/html
- /etc/letsencrypt:/etc/letsencrypt # SSL 인증서 공유
depends_on:
- fastapi
prometheus:
image: prom/prometheus:latest
container_name: prometheus
ports:
- "9090:9090"
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus_data:/prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.retention.time=7d" # 7일치 데이터 보관
- "--web.external-url=https://smishing-detect-kdt2.cloud/prometheus/"
- "--web.route-prefix=/"
restart: unless-stopped
grafana:
image: grafana/grafana:latest
container_name: grafana
ports:
- "3000:3000"
env_file:
- .env
environment:
- GF_SECURITY_ADMIN_PASSWORD=${GF_SECURITY_ADMIN_PASSWORD} # 초기비밀번호
- GF_SERVER_ROOT_URL=https://smishing-detect-kdt2.cloud/grafana/
- GF_SERVER_SERVE_FROM_SUB_PATH=true
volumes:
- grafana_data:/var/lib/grafana
restart: unless-stopped
# Grafana는 요청 URI 자체가 /grafana/... 형태로 들어오기를 기대
# 경로가 안 맞으면 그라파나는 canonical redirect 발생시킴
node-exporter: # 리눅스 유닉스 계열 서버 os metric 수집해줌
image: prom/node-exporter:latest
container_name: node-exporter
ports:
- "9100:9100"
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- "--path.procfs=/host/proc"
- "--path.sysfs=/host/sys"
restart: unless-stopped
volumes:
prometheus_data:
grafana_data:
# 도커 컴포즈가 프로젝트명_default라는 기본 브릿지 네트워크를 생성