-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
57 lines (53 loc) · 1.59 KB
/
docker-compose.yml
File metadata and controls
57 lines (53 loc) · 1.59 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
services:
yfinance-service:
build: .
image: yfinance-service:latest
restart: unless-stopped
ports:
- "8000:8000"
healthcheck:
test: [ "CMD", "python", "-c", "import sys,urllib.request; urllib.request.urlopen('http://localhost:8000/health', timeout=3); sys.exit(0)" ]
interval: 30s
timeout: 10s
retries: 3
prometheus:
image: prom/prometheus:latest
restart: unless-stopped
ports:
- "9090:9090"
volumes:
- prometheus_data:/prometheus
- ./monitoring/infra/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- ./monitoring/infra/alert.rules.yml:/etc/prometheus/alert.rules.yml:ro
- ./monitoring/infra/recording.rules.yml:/etc/prometheus/recording.rules.yml:ro
depends_on:
- yfinance-service
command:
- '--config.file=/etc/prometheus/prometheus.yml'
alertmanager:
image: prom/alertmanager:latest
restart: unless-stopped
ports:
- "9093:9093"
volumes:
- ./monitoring/infra/alertmanager.yml:/etc/alertmanager/alertmanager.yml:ro
command:
- '--config.file=/etc/alertmanager/alertmanager.yml'
depends_on:
- prometheus
grafana:
image: grafana/grafana:latest
restart: unless-stopped
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
ports:
- "3000:3000"
volumes:
- grafana_data:/var/lib/grafana
- ./monitoring/grafana/datasources:/etc/grafana/provisioning/datasources
- ./monitoring/grafana/dashboards:/etc/grafana/provisioning/dashboards
depends_on:
- prometheus
volumes:
prometheus_data:
grafana_data: