Skip to content

Commit

Permalink
add persistant backup
Browse files Browse the repository at this point in the history
  • Loading branch information
Sepovsky committed Jun 29, 2022
1 parent 727b8d8 commit 335d6e3
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ services:
image: quay.io/prometheus/node-exporter:latest
container_name: node_exporter
command:
- '--path.rootfs=/host'
- '--path.procfs=/host/proc'
- '--path.rootfs=/rootfs'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
pid: host
restart: unless-stopped
volumes:
- '/:/host:ro,rslave'
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
expose:
- 9100
networks:
Expand All @@ -20,6 +25,13 @@ services:
container_name: prometheus
volumes:
- './prometheus.yml:/etc/prometheus/prometheus.yml'
- './prometheus_db:/var/lib/prometheus'
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--web.enable-lifecycle'
expose:
- 9090
networks:
Expand All @@ -28,6 +40,11 @@ services:
grafana:
image: grafana/grafana
container_name: grafana
depends_on:
- prometheus
user: "0"
volumes:
- './grafana_db:/var/lib/grafana'
ports:
- 3000:3000
networks:
Expand Down

0 comments on commit 335d6e3

Please sign in to comment.