Skip to content

Instantly share code, notes, and snippets.

@naviat
Forked from mlabouardy/docker-compose.yml
Created August 1, 2018 16:34
Show Gist options
  • Save naviat/3dcd3bd07c95b6fc7ddcc9335049b5d3 to your computer and use it in GitHub Desktop.
Save naviat/3dcd3bd07c95b6fc7ddcc9335049b5d3 to your computer and use it in GitHub Desktop.
TICK stack: telegraf, influxdb, chronograf, kapacitor with swarm mode
version: "3.3"
services:
telegraf:
image: telegraf:1.3
networks:
- tick-net
volumes:
- /var/run/docker.sock:/var/run/docker.sock
configs:
- source: telegraf-config
target: /etc/telegraf/telegraf.conf
deploy:
restart_policy:
condition: on-failure
mode: global
influxdb:
image: influxdb:1.2
networks:
- tick-net
deploy:
restart_policy:
condition: on-failure
placement:
constraints:
- node.role == worker
chronograf:
image: chronograf:1.3
networks:
- tick-net
ports:
- 8888:8888
deploy:
restart_policy:
condition: on-failure
placement:
constraints:
- node.role == manager
kapacitor:
image: kapacitor:1.2
networks:
- tick-net
configs:
- source: kapacitor-config
target: /etc/kapacitor/kapacitor.conf
deploy:
restart_policy:
condition: on-failure
placement:
constraints:
- node.role == worker
configs:
telegraf-config:
file: $PWD/conf/telegraf/telegraf.conf
kapacitor-config:
file: $PWD/conf/kapacitor/kapacitor.conf
networks:
tick-net:
driver: overlay
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment