influxdb-docker

example: von: https://www.influxdata.com/blog/running-influxdb-2-0-and-telegraf-using-docker/

version: '3'
services:
  influxdb:
    image: influxdb:latest
    volumes:
      - /docker/influxdb:/var/lib/influxdb2:rw
    ports:
      - 8086:8086
  # Use the influx cli to set up an influxdb instance. 
  influxdb_cli:
    links:
      - influxdb
    image: influxdb:latest
    volumes:
      # Mount for influxdb data directory and configuration
      - /docker/influxdb:/var/lib/influxdb2:rw
    environment: 
       # Use these same configurations parameters in your telegraf configuration, mytelegraf.conf.
      - DOCKER_INFLUXDB_INIT_MODE=setup
      - DOCKER_INFLUXDB_INIT_USERNAME=myusername
      - DOCKER_INFLUXDB_INIT_PASSWORD=passwordpasswordpassword
      - DOCKER_INFLUXDB_INIT_ORG=myorg
      - DOCKER_INFLUXDB_INIT_BUCKET=mybucket
      - DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=mytoken
    entrypoint: ["./entrypoint.sh"]
    restart: on-failure:10
    depends_on:
      - influxdb

volumes:
  influxdb:
  • influxdb-docker.txt
  • Zuletzt geändert: 2021/12/22 11:03
  • von Fabian Horst