Skip to content

InfluxDBv2 installation

smilebasti edited this page Jun 7, 2023 · 5 revisions

npmGrafStats currently uses InfluxDBv2 to store the gathered logs.

A complete installation example is available with the docker-compose.yml file.

If you have to use InfluxDBv1 check the Branch: Influx-v1 It's NOT maintained! Only basics features!

Docker Compose

This will set up the admin user and the required organization npmgrafstats and the first bucket to store the data also named and required npmgrafstats.

version: '3.8'
services:  
  influxdb:
    image: influxdb:2.7-alpine
    restart: unless-stopped
    environment:
      DOCKER_INFLUXDB_INIT_MODE: 'setup'
      DOCKER_INFLUXDB_INIT_USERNAME: '<replace>'
      DOCKER_INFLUXDB_INIT_PASSWORD: '<replace>' # atleast 8 characters
      DOCKER_INFLUXDB_INIT_ORG: 'npmgrafstats'
      DOCKER_INFLUXDB_INIT_BUCKET: 'npmgrafstats'
    volumes:
      # Mount for influxdb data directory and configuration
      - ./influxdbv2:/var/lib/influxdb2
    ports:
      - '8086:8086'

For original installation instructions see: https://hub.docker.com/_/influxdb/

Clone this wiki locally