Skip to content

Instantly share code, notes, and snippets.

@phrozen
Created August 15, 2019 15:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phrozen/bc7b1333dbd28fa300cab9a317b05808 to your computer and use it in GitHub Desktop.
Save phrozen/bc7b1333dbd28fa300cab9a317b05808 to your computer and use it in GitHub Desktop.
InfluxData TICK stack (InfluxDB + Telegraf + Kapacitor + Chronograf + CLI)
version: '3'
services:
# Define an InfluxDB service
influxdb:
image: influxdb:latest
volumes:
# Mount for influxdb data directory
- ./data/influxdb:/var/lib/influxdb
# Mount for influxdb configuration
- ./etc/influxdb/:/etc/influxdb/
ports:
# The API for InfluxDB is served on port 8086
- "8086:8086"
- "8082:8082"
# Define a Telegraf service
telegraf:
image: telegraf:latest
volumes:
- ./etc/telegraf.conf:/etc/telegraf/telegraf.conf:ro
depends_on:
- influxdb
ports:
- "8092:8092/udp"
- "8094:8094"
- "8125:8125/udp"
# Define a Kapacitor service
kapacitor:
image: kapacitor:latest
environment:
KAPACITOR_HOSTNAME: kapacitor
KAPACITOR_INFLUXDB_0_URLS_0: http://influxdb:8086
depends_on:
- influxdb
ports:
- "9092:9092"
# Define a Chronograf service
chronograf:
image: chronograf:latest
volumes:
# Mount for chronograf database
- ./data/chronograf:/var/lib/chronograf
environment:
INFLUXDB_URL: http://influxdb:8086
KAPACITOR_URL: http://kapacitor:9092
depends_on:
- influxdb
- kapacitor
ports:
- "8888:8888"
# Define a service for using the influx CLI tool.
# docker-compose run influxdb-cli
influxdb-cli:
image: influxdb:latest
entrypoint:
- influx
- -host
- influxdb
depends_on:
- influxdb
# Define a service for using the kapacitor CLI tool.
# docker-compose run kapacitor-cli
kapacitor-cli:
image: kapacitor:latest
entrypoint: bash
environment:
KAPACITOR_URL: http://kapacitor:9092
depends_on:
- kapacitor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment