Files
compose-anything/src/node-exporter/docker-compose.yaml
Sun-ZhenXing 3c609b5989 feat: add more
2025-10-06 21:48:39 +08:00

37 lines
908 B
YAML

x-default: &default
restart: unless-stopped
volumes:
- &localtime /etc/localtime:/etc/localtime:ro
- &timezone /etc/timezone:/etc/timezone:ro
logging:
driver: json-file
options:
max-size: 100m
services:
node-exporter:
<<: *default
image: prom/node-exporter:${NODE_EXPORTER_VERSION:-v1.8.2}
container_name: node-exporter
ports:
- "${NODE_EXPORTER_PORT_OVERRIDE:-9100}:9100"
command:
- '--path.rootfs=/host'
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
volumes:
- '/:/host:ro,rslave'
deploy:
resources:
limits:
cpus: '0.25'
memory: 128M
reservations:
cpus: '0.1'
memory: 64M
# Run with host network for accurate metrics
# network_mode: host
volumes: {}