mirror of
https://github.com/mainflux/mainflux.git
synced 2025-04-26 13:48:53 +08:00
72 lines
2.2 KiB
YAML
72 lines
2.2 KiB
YAML
# Copyright (c) Mainflux
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# 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.7"
|
|
|
|
networks:
|
|
docker_mainflux-base-net:
|
|
external: true
|
|
|
|
volumes:
|
|
mainflux-influxdb-volume:
|
|
mainflux-grafana-volume:
|
|
|
|
services:
|
|
influxdb:
|
|
image: influxdb:1.8.5
|
|
container_name: mainflux-influxdb
|
|
restart: on-failure
|
|
environment:
|
|
INFLUXDB_DB: ${MF_INFLUXDB_DB}
|
|
INFLUXDB_ADMIN_USER: ${MF_INFLUXDB_ADMIN_USER}
|
|
INFLUXDB_ADMIN_PASSWORD: ${MF_INFLUXDB_ADMIN_PASSWORD}
|
|
INFLUXDB_HTTP_AUTH_ENABLED: ${MF_INFLUXDB_HTTP_AUTH_ENABLED}
|
|
networks:
|
|
- docker_mainflux-base-net
|
|
ports:
|
|
- ${MF_INFLUXDB_PORT}:${MF_INFLUXDB_PORT}
|
|
volumes:
|
|
- mainflux-influxdb-volume:/var/lib/influxdb
|
|
|
|
influxdb-writer:
|
|
image: mainflux/influxdb-writer:${MF_RELEASE_TAG}
|
|
container_name: mainflux-influxdb-writer
|
|
depends_on:
|
|
- influxdb
|
|
restart: on-failure
|
|
environment:
|
|
MF_INFLUX_WRITER_LOG_LEVEL: debug
|
|
MF_NATS_URL: ${MF_NATS_URL}
|
|
MF_INFLUX_WRITER_PORT: ${MF_INFLUX_WRITER_PORT}
|
|
MF_INFLUX_WRITER_BATCH_SIZE: ${MF_INFLUX_WRITER_BATCH_SIZE}
|
|
MF_INFLUX_WRITER_BATCH_TIMEOUT: ${MF_INFLUX_WRITER_BATCH_TIMEOUT}
|
|
MF_INFLUXDB_DB: ${MF_INFLUXDB_DB}
|
|
MF_INFLUXDB_HOST: mainflux-influxdb
|
|
MF_INFLUXDB_PORT: ${MF_INFLUXDB_PORT}
|
|
MF_INFLUXDB_ADMIN_USER: ${MF_INFLUXDB_ADMIN_USER}
|
|
MF_INFLUXDB_ADMIN_PASSWORD: ${MF_INFLUXDB_ADMIN_PASSWORD}
|
|
ports:
|
|
- ${MF_INFLUX_WRITER_PORT}:${MF_INFLUX_WRITER_PORT}
|
|
networks:
|
|
- docker_mainflux-base-net
|
|
volumes:
|
|
- ./config.toml:/config.toml
|
|
|
|
grafana:
|
|
image: grafana/grafana:7.3.7
|
|
container_name: mainflux-grafana
|
|
depends_on:
|
|
- influxdb
|
|
restart: on-failure
|
|
ports:
|
|
- ${MF_INFLUX_WRITER_GRAFANA_PORT}:${MF_GRAFANA_PORT}
|
|
networks:
|
|
- docker_mainflux-base-net
|
|
volumes:
|
|
- mainflux-grafana-volume:/var/lib/grafana
|