mirror of
https://github.com/mainflux/mainflux.git
synced 2025-04-29 13:49:28 +08:00

* MF-1254 - Create universal JSON writer (#1260) Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * Add JSON support to Readers Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * Fix Influx Reader tests Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * Fix messages format query Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * Fix Postgres reader Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * Fix Cassandra Readers and writers Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * Fix Mongo reader Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * Extract utility method to the JSON transformer Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * Fix Influx and Postgres count Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * Update JSON transformer Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * Fix Influxdb Reader total count Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * Refactor init.go for Cassandra writer Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * Create a Payload type Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * Add comments for defaults Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * Fix variable declarations Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * Replace interface{} with a new type Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * Don't set channel just to overwrite it later Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * Fix range search Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * Rename Messages field Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> Co-authored-by: Manuel Imperiale <manuel.imperiale@gmail.com>
71 lines
2.2 KiB
YAML
71 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.6.4-alpine
|
|
container_name: mainflux-influxdb
|
|
restart: on-failure
|
|
environment:
|
|
INFLUXDB_DB: ${MF_INFLUX_WRITER_DB}
|
|
INFLUXDB_ADMIN_USER: ${MF_INFLUX_WRITER_DB_USER}
|
|
INFLUXDB_ADMIN_PASSWORD: ${MF_INFLUX_WRITER_DB_PASS}
|
|
networks:
|
|
- docker_mainflux-base-net
|
|
ports:
|
|
- ${MF_INFLUX_WRITER_DB_PORT}:${MF_INFLUX_WRITER_DB_PORT}
|
|
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: ${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_INFLUX_WRITER_DB: ${MF_INFLUX_WRITER_DB}
|
|
MF_INFLUX_WRITER_DB_HOST: mainflux-influxdb
|
|
MF_INFLUX_WRITER_DB_PORT: ${MF_INFLUX_WRITER_DB_PORT}
|
|
MF_INFLUX_WRITER_DB_USER: ${MF_INFLUX_WRITER_DB_USER}
|
|
MF_INFLUX_WRITER_DB_PASS: ${MF_INFLUX_WRITER_DB_PASS}
|
|
ports:
|
|
- ${MF_INFLUX_WRITER_PORT}:${MF_INFLUX_WRITER_PORT}
|
|
networks:
|
|
- docker_mainflux-base-net
|
|
volumes:
|
|
- ./config.toml:/config.toml
|
|
|
|
grafana:
|
|
image: grafana/grafana:5.1.3
|
|
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
|