-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathdocker-compose.yaml
48 lines (44 loc) · 1.44 KB
/
docker-compose.yaml
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
services:
micros-gateway:
image: bxnxm/micros-gateway:2.4.1
container_name: micros-gateway
environment:
- GATEWAYIP=10.0.1.1
- API_AUTH=${API_AUTH:-usr:pwd} # Use environment variable or fallback
ports:
- "5000:5000" # Expose Flask REST API port to host
networks:
- micros_nw
prometheus:
image: prom/prometheus:latest
container_name: prometheus
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro # Mount config as read-only
- prometheus_volume:/prometheus # Persist Prometheus data
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.retention.time=365d'
ports:
- "9090:9090" # Expose Prometheus UI port to host
networks:
- micros_nw
grafana:
image: grafana/grafana:latest
container_name: grafana
depends_on:
- prometheus
ports:
- "3000:3000" # Expose Grafana UI port to host
networks:
- micros_nw
volumes:
- grafana_data:/var/lib/grafana # Persist Grafana data
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD:-admin} # Default password
networks:
micros_nw:
driver: bridge
volumes:
prometheus_volume:
grafana_data: