Skip to content

Instantly share code, notes, and snippets.

@boysbee
Created May 4, 2017 11:11
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boysbee/35ecfb6e0e1644ecc64a3763a244f8be to your computer and use it in GitHub Desktop.
Save boysbee/35ecfb6e0e1644ecc64a3763a244f8be to your computer and use it in GitHub Desktop.
docker-compose influx, chronograf,kapacitor
version: '2'
services:
# Define a Telegraf service
telegraf:
image: telegraf
volumes:
- ./telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro
links:
- influxdb
ports:
- "8092:8092/udp"
- "8094:8094"
- "8125:8125/udp"
# Define an InfluxDB service
influxdb:
image: influxdb:alpine
volumes:
- ./data/influxdb:/var/lib/influxdb
ports:
- "8086:8086"
# Define a Chronograf service
chronograf:
image: chronograf
volumes:
- ./data/chronograf:/var/lib/chronograf
ports:
- "10000:10000"
links:
- influxdb
# Define a Kapacitor service
kapacitor:
image: kapacitor
environment:
KAPACITOR_HOSTNAME: kapacitor
KAPACITOR_INFLUXDB_0_URLS_0: http://influxdb:8086
volumes:
- ./data/kapacitor:/var/lib/kapacitor
links:
- influxdb
ports:
- "9092:9092"
# Define a service for using the influx CLI tool.
# docker-compose run influxdb-cli
influxdb-cli:
image: influxdb
entrypoint:
- influx
- -host
- influxdb
links:
- influxdb
# Define a service for using the kapacitor CLI tool.
# docker-compose run kapacitor-cli
kapacitor-cli:
image: kapacitor
entrypoint: bash
environment:
KAPACITOR_URL: http://kapacitor:9092
links:
- kapacitor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment