-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (52 loc) · 1.49 KB
/
docker-compose.yml
File metadata and controls
56 lines (52 loc) · 1.49 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
version: '3.9'
services:
prometheus:
image: prom/prometheus:latest
container_name: prometheus
volumes:
- ./prometheus:/etc/prometheus
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
- '--storage.tsdb.retention.time=15d'
ports:
- '9090:9090'
restart: unless-stopped
networks:
- monitoring
extra_hosts:
- 'host.docker.internal:host-gateway'
grafana:
image: grafana/grafana:latest
container_name: grafana
volumes:
- grafana_data:/var/lib/grafana
- ./grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
- ./grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=Moment7772324!
- GF_SECURITY_ALLOW_EMBEDDING=false
- GF_AUTH_ANONYMOUS_ENABLED=false
- GF_SERVER_ROOT_URL=http://localhost:4000
- GF_SECURITY_DISABLE_GRAVATAR=true
- GF_USERS_ALLOW_SIGN_UP=false
- GF_SERVER_HTTP_PORT=4001
ports:
- '4000:4001'
restart: unless-stopped
networks:
- monitoring
depends_on:
- prometheus
volumes:
prometheus_data:
driver: local
grafana_data:
driver: local
networks:
monitoring:
driver: bridge