root@monitoring:~# apt update
root@monitoring:~# apt install docker.io
root@monitoring:~# docker network create monitoring_network
root@monitoring:~# docker network ls
root@monitoring:~# docker volume create influxdb-volume
root@monitoring:~# docker volume create grafana-volume
root@monitoring:~# docker volume ls
root@monitoring:~# mkdir ct
root@monitoring:~# cd ct/
root@monitoring:~/ct# apt install git vim docker-compose
root@monitoring:~/ct# vim docker-compose.yml
version: "3"
services:
grafana:
image: grafana/grafana
container_name: grafana_container
restart: always
ports:
- 3000:3000
networks:
- monitoring_network
volumes:
- grafana-volume:/var/lib/grafana
influxdb:
image: influxdb
container_name: influxdb_container
restart: always
ports:
- 8086:8086
- 8089:8089/udp
networks:
- monitoring_network
volumes:
- influxdb-volume:/var/lib/influxdb
networks:
monitoring_network:
volumes:
grafana-volume:
external: true
influxdb-volume:
external: true
root@monitoring:~/ct# docker-compose up -d