104
edits
No edit summary |
No edit summary |
||
Line 79: | Line 79: | ||
==InfluxDB & Grafana setup example with docker-compose== | ==InfluxDB & Grafana setup example with docker-compose== | ||
docker-compose.yml | * create the docker-compose.yml | ||
<pre> | |||
version: '3.6' | version: '3.6' | ||
services: | services: | ||
influxdb: | influxdb: | ||
image: influxdb:latest | |||
image: influxdb:latest | container_name: influxdb | ||
restart: always | |||
container_name: influxdb | environment: | ||
- DOCKER_INFLUXDB_INIT_MODE=setup | |||
restart: always | - DOCKER_INFLUXDB_INIT_USERNAME=admin | ||
- DOCKER_INFLUXDB_INIT_PASSWORD=a_secure_password | |||
environment: | - DOCKER_INFLUXDB_INIT_ORG=MyCompany | ||
- DOCKER_INFLUXDB_INIT_BUCKET=allegro-network-multimeter | |||
- DOCKER_INFLUXDB_INIT_MODE=setup | ports: | ||
- '8086:8086' | |||
- DOCKER_INFLUXDB_INIT_USERNAME=admin | volumes: | ||
- influxdb-data:/var/lib/influxdb2 | |||
- DOCKER_INFLUXDB_INIT_PASSWORD=a_secure_password | - influxdb-conf:/etc/influxdb2 | ||
- DOCKER_INFLUXDB_INIT_ORG=MyCompany | grafana: | ||
image: grafana/grafana-oss:latest | |||
- DOCKER_INFLUXDB_INIT_BUCKET=allegro-network-multimeter | container_name: grafana | ||
restart: always | |||
ports: | depends_on: | ||
- influxdb | |||
- '8086:8086' | environment: | ||
- GF_SECURITY_ADMIN_USER=admin | |||
- GF_SECURITY_ADMIN_PASSWORD=a_secure_password | |||
links: | |||
- influxdb | |||
ports: | |||
- '3000:3000' | |||
volumes: | |||
- grafana-data:/var/lib/grafana | |||
- grafana-provisioning:/etc/grafana/provisioning | |||
- ./grafana.ini:/etc/grafana/grafana.ini | |||
volumes: | volumes: | ||
influxdb-data: | |||
influxdb-conf: | |||
grafana-data: | |||
grafana-provisioning: | |||
</pre> | |||
* create a empty grafana.ini file | |||
* run docker-compose up -d | |||
edits