1
0
mirror of https://github.com/mainflux/mainflux.git synced 2025-04-27 13:48:49 +08:00

71 lines
1.8 KiB
YAML
Raw Normal View History

###
# This docker-compose file contains optional InfluxDB, InfluxDB-writer and Grafana services
# for the Mainflux platform. Since this services are optional, this file is dependent on the
# docker-compose.yml file from <project_root>/docker/. In order to run these services,
# core services, as well as the network from the core composition, should be already running.
###
version: "3"
networks:
docker_mainflux-base-net:
external: true
volumes:
mainflux-influxdb-volume:
mainflux-grafana-volume:
services:
influxdb:
image: influxdb:1.6.4-alpine
container_name: mainflux-influxdb
restart: on-failure
environment:
INFLUXDB_DB: mainflux
INFLUXDB_ADMIN_USER: mainflux
INFLUXDB_ADMIN_PASSWORD: mainflux
networks:
- docker_mainflux-base-net
ports:
- 8086:8086
volumes:
- mainflux-influxdb-volume:/var/lib/influxdb
influxdb-writer:
image: mainflux/influxdb-writer:latest
container_name: mainflux-influxdb-writer
depends_on:
- influxdb
restart: on-failure
environment:
MF_INFLUX_WRITER_LOG_LEVEL: debug
MF_NATS_URL: nats://nats:4222
MF_INFLUX_WRITER_PORT: 8900
MF_INFLUX_WRITER_BATCH_SIZE: 5000
MF_INFLUX_WRITER_BATCH_TIMEOUT: 5
MF_INFLUX_WRITER_DB_NAME: mainflux
MF_INFLUX_WRITER_DB_HOST: mainflux-influxdb
MF_INFLUX_WRITER_DB_PORT: 8086
MF_INFLUX_WRITER_DB_USER: mainflux
MF_INFLUX_WRITER_DB_PASS: mainflux
ports:
- 8900:8900
networks:
- docker_mainflux-base-net
volumes:
- ./channels.toml:/config/channels.toml
grafana:
image: grafana/grafana:5.1.3
container_name: mainflux-grafana
depends_on:
- influxdb
restart: on-failure
ports:
- 3001:3000
networks:
- docker_mainflux-base-net
volumes:
- mainflux-grafana-volume:/var/lib/grafana