-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
71 lines (62 loc) · 1.66 KB
/
docker-compose.yml
File metadata and controls
71 lines (62 loc) · 1.66 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
version: '3.8'
services:
# NOTRE APPLICATION (DEEP INSIDE US)
app:
build:
context: .
dockerfile: Dockerfile
ports:
- "81:80" # Expose le port 80 du conteneur sur le port 81 de l'hôte
networks:
- monitoring
# SERVICE NGINX PROMETHEUS EXPORTER
nginx-exporter:
image: nginx/nginx-prometheus-exporter:latest
container_name: nginx_exporter
ports:
- "9113:9113"
command:
- "--nginx.scrape-uri=http://app:80/stub_status" # Commande correcte pour spécifier l'URL du stub_status
depends_on:
- app
networks:
- monitoring
# SERVICE NODE EXPORTER
node-exporter:
image: prom/node-exporter:latest
container_name: node_exporter
ports:
- "9100:9100" # Expose le port 9100 pour les métriques Node Exporter
networks:
- monitoring
# SERVICE PROMETHEUS
prometheus:
image: prom/prometheus:latest
container_name: prometheus
ports:
- "9090:9090"
networks:
- monitoring
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml # Configuration de Prometheus
# SERVICE GRAFANA :
grafana:
image: grafana/grafana-oss:latest
container_name: grafana
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_PASSWORD=test # Mot de passe admin pour Grafana
volumes:
- ./grafana/provisioning:/etc/grafana/provisioning # Monter la configuration du provisioning
- grafana_data:/var/lib/grafana # Volumes persistants pour les données de Grafana
depends_on:
- prometheus
restart: always
networks:
- monitoring
networks:
monitoring:
driver: bridge
volumes:
grafana_data: