docker and docker-compose doivent etre installes
Si vous utilisez Grafana avec MQTT il faut compiler:
Pour chacun des services il faut creer une zone persistante dans /data par exemple:
docker-grafana docker-mosquitto graphite mongodb
le pluggin mqtt_datasource doit etre compile et installer dans:
/data/docker-grafana/grafana_plugins/mqtt-datasource
C'est le fichier de controle de docker
version: “3.6” services:
graphite: image : graphiteapp/graphite-statsd container_name: graphite environment: - PUID=1000 - PGID=1000 volumes: - /data/graphite/storage:/opt/graphite/storage ports: - 80:80 - 2003-2004:2003-2004 - 2023-2024:2023-2024 - 8126:8126 - 8125:8125/udp restart: unless-stopped mongodb: image : mongo:3.6.3 container_name: mongodb environment: - PUID=1000 - PGID=1000 volumes: - /data/mongodb/database:/data/db ports: - 27017-27019:27017-27019 restart: unless-stopped mosquitto: image : eclipse-mosquitto container_name: mosquitto environment: - PUID=1000 - PGID=1000 volumes: - /data/docker-mosquitto/mosquitto:/mosquitto - /data/docker-mosquitto/mosquitto/data:/mosquitto/data - /data/docker-mosquitto/mosquitto/log:/mosquitto/log ports: - 1883:1883 restart: unless-stopped grafana: image: grafana/grafana:8.4.4 container_name: grafana-server restart: unless-stopped environment: - GF_SECURITY_ADMIN_USER=admin - GF_SECURITY_ADMIN_PASSWORD=Monpasswd_admin - GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=grafana-mqtt-datasource ports: - 3000:3000 volumes: - /data/docker-grafana/grafana_plugins:/var/lib/grafana/plugins - /data/docker-grafana/grafana_data:/var/lib/grafana
docker-compose up/down
docker ps