-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcompose.dev.yml
More file actions
129 lines (120 loc) · 2.82 KB
/
Copy pathcompose.dev.yml
File metadata and controls
129 lines (120 loc) · 2.82 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
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
---
networks:
monitoring:
name: monitoring
attachable: true
volumes:
prometheus_data:
name: prometheus_data
grafana_data:
name: grafana_data
dashboards:
name: dashboards
services:
prometheus:
image: prom/prometheus:latest
hostname: prometheus
container_name: prometheus
restart: unless-stopped
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
configs:
- source: prometheus.yml
target: /etc/prometheus/prometheus.yml
mode: 0444
volumes:
- prometheus_data:/prometheus
networks:
- monitoring
ports:
- 9090:9090
grafana:
image: grafana/grafana:latest
hostname: grafana
container_name: grafana
restart: unless-stopped
depends_on:
prometheus:
condition: service_started
environment:
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: changeme
GF_AUTH_ANONYMOUS_ENABLED: true
configs:
- source: dashboard.yml
target: /etc/grafana/provisioning/dashboards/dashboard.yml
mode: 0444
- source: datasource.yml
target: /etc/grafana/provisioning/datasources/datasource.yml
mode: 0444
volumes:
- grafana_data:/var/lib/grafana
- dashboards:/etc/grafana/dashboards
networks:
- monitoring
ports:
- 3000:3000
endoflifeexporter:
build:
context: .
dockerfile: Dockerfile
hostname: endoflifeexporter
container_name: endoflifeexporter
restart: unless-stopped
depends_on:
prometheus:
condition: service_started
environment:
ADDRESS: ":8080"
CONFIG_FILE: "/config.yml"
LOG_FORMAT: "console"
volumes:
- ./sample.config.yml:/config.yml
networks:
- monitoring
ports:
- 8080:8080
configs:
datasource.yml:
name: datasource.yml
content: |
---
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
access: proxy
orgId: 1
url: http://prometheus:9090/
basicAuth: false
isDefault: true
editable: true
dashboard.yml:
name: dashboard.yml
content: |
---
apiVersion: 1
providers:
- name: 'Prometheus'
orgId: 1
folder: ''
type: file
disableDeletion: false
editable: true
allowUiUpdates: true
options:
path: /etc/grafana/dashboards
prometheus.yml:
name: prometheus.yml
content: |
---
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: "endoflifeexporter"
scrape_interval: 2m
scrape_timeout: 1m
static_configs:
- targets: ["endoflifeexporter:8080"]