refactor (service): use more identifiable volume and net name grafana
This commit is contained in:
parent
377c981c81
commit
1f38060fcf
1 changed files with 12 additions and 8 deletions
|
@ -1,6 +1,7 @@
|
|||
services:
|
||||
prometheus:
|
||||
image: prom/prometheus:latest
|
||||
container_name: prometheus
|
||||
volumes:
|
||||
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
|
||||
- prometheus_data:/prometheus
|
||||
|
@ -8,7 +9,7 @@ services:
|
|||
|
||||
node-exporter:
|
||||
image: prom/node-exporter:latest
|
||||
restart: unless-stopped
|
||||
container_name: node-exporter
|
||||
volumes:
|
||||
- /proc:/host/proc:ro
|
||||
- /sys:/host/sys:ro
|
||||
|
@ -17,26 +18,28 @@ services:
|
|||
- "--path.procfs=/host/proc"
|
||||
- "--path.rootfs=/rootfs"
|
||||
- "--path.sysfs=/host/sys"
|
||||
restart: unless-stopped
|
||||
|
||||
loki:
|
||||
image: grafana/loki:latest
|
||||
restart: unless-stopped
|
||||
container_name: loki
|
||||
volumes:
|
||||
- loki_data:/loki
|
||||
restart: unless-stopped
|
||||
|
||||
promtail:
|
||||
image: grafana/promtail:latest
|
||||
restart: unless-stopped
|
||||
container_name: promtail
|
||||
volumes:
|
||||
- ./promtail/promtail-config.yml:/etc/promtail/config.yml
|
||||
- /var/log:/var/log
|
||||
restart: unless-stopped
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana:latest
|
||||
container_name: grafana
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- grafana_data:/var/lib/grafana
|
||||
- data:/var/lib/grafana
|
||||
environment:
|
||||
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}
|
||||
- GF_USERS_ALLOW_SIGN_UP=false
|
||||
|
@ -45,15 +48,16 @@ services:
|
|||
ports:
|
||||
- "8000:3000"
|
||||
networks:
|
||||
- default
|
||||
- internal
|
||||
- web
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
data:
|
||||
prometheus_data:
|
||||
loki_data:
|
||||
grafana_data:
|
||||
|
||||
networks:
|
||||
default:
|
||||
internal:
|
||||
web:
|
||||
external: true
|
||||
|
|
Loading…
Add table
Reference in a new issue