-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.yml
85 lines (78 loc) · 2.21 KB
/
docker-compose.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
version: '2.1'
volumes:
alertmanager_data: {}
grafana_data: {}
prometheus_data: {}
services:
# promcheck:
# image: prom/prometheus:v2.37.0
# container_name: promcheck
# volumes:
# - ./prometheus:/etc/prometheus
# entrypoint: /bin/promtool
# command: check config /etc/prometheus/prometheus.yml
envsubst:
image: bhgedigital/envsubst
container_name: envsubst
volumes:
- ./alertmanager:/mnt
command: sh -c "cat /mnt/alertmanager.envsubst | envsubst > /mnt/alertmanager.yml"
environment:
- SLACK_API_URL=${SLACK_API_URL:-http://localhost:9093/NO_SLACK_API_URL}
- SLACK_CONFIG_CHANNEL=${SLACK_CONFIG_CHANNEL:-#NO_SLACK_CONFIG_CHANNEL}
prometheus:
image: prom/prometheus:v2.37.0
container_name: prometheus
volumes:
- ./prometheus:/etc/prometheus
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.external-url=http://localhost:9090'
expose:
- 9090
links:
- fastly-exporter:fastly-exporter
ports:
- 9090:9090
alertmanager:
image: prom/alertmanager:v0.24.0
container_name: alertmanager
volumes:
- ./alertmanager:/config
- alertmanager_data:/alertmanager
command:
- '--config.file=/config/alertmanager.yml'
- '--web.external-url=http://localhost:9093'
expose:
- 9093
links:
- fastly-exporter:fastly-exporter
ports:
- 9093:9093
depends_on:
envsubst:
condition: service_completed_successfully
grafana:
image: grafana/grafana:9.1.3
env_file:
- ./grafana/config.env
depends_on:
- prometheus
ports:
- 3000:3000
volumes:
- ./grafana/provisioning/:/etc/grafana/provisioning/
- grafana_data:/var/lib/grafana
fastly-exporter:
image: ghcr.io/fastly/fastly-exporter:v7.2.4
command: ${FASTLY_EXPORTER_OPTIONS:--namespace fastly}
environment:
- FASTLY_API_TOKEN=${FASTLY_API_TOKEN}
# minimize spurious (Client.Timeout exceeded while awaiting headers) errors for idle services
- FASTLY_EXPORTER_RT_TIMEOUT=120s
expose:
- 8080
ports:
- 8080:8080