services: node-exporter: image: prom/node-exporter:latest hostname: node-exporter restart: unless-stopped volumes: - /proc:/host/proc:ro - /sys:/host/sys:ro - /:/rootfs:ro - /var/lib/node-exporter/textfiles:/textfiles:ro command: - '--path.procfs=/host/proc' - '--path.rootfs=/rootfs' - '--path.sysfs=/host/sys' - '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)' - '--collector.textfile.directory=/textfiles' - '--web.telemetry-path=/_prom/metrics' expose: - 9100 networks: - monitoring-network logging: driver: journald options: tag: "container-{{.Name}}" prometheus: image: prom/prometheus:latest restart: unless-stopped depends_on: - node-exporter volumes: - "./prometheus.yaml:/etc/prometheus/prometheus.yml" networks: - monitoring-network logging: driver: journald options: tag: "container-{{.Name}}" networks: monitoring-network: