mirror of
https://github.com/mainflux/mainflux.git
synced 2025-05-02 22:17:10 +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>
59 lines
2.1 KiB
YAML
59 lines
2.1 KiB
YAML
# Copyright (c) Mainflux
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# This docker-compose file contains optional Postgres and Postgres-writer services
|
|
# for Mainflux platform. Since these are optional, this file is dependent of docker-compose file
|
|
# from <project_root>/docker. In order to run these services, execute command:
|
|
# docker-compose -f docker/docker-compose.yml -f docker/addons/postgres-writer/docker-compose.yml up
|
|
# from project root. PostgreSQL default port (5432) is exposed, so you can use various tools for database
|
|
# inspection and data visualization.
|
|
|
|
version: "3.7"
|
|
|
|
networks:
|
|
docker_mainflux-base-net:
|
|
external: true
|
|
|
|
volumes:
|
|
mainflux-postgres-writer-volume:
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:10.2-alpine
|
|
container_name: mainflux-postgres
|
|
restart: on-failure
|
|
environment:
|
|
POSTGRES_USER: ${MF_POSTGRES_WRITER_DB_USER}
|
|
POSTGRES_PASSWORD: ${MF_POSTGRES_WRITER_DB_PASS}
|
|
POSTGRES_DB: ${MF_POSTGRES_WRITER_DB}
|
|
networks:
|
|
- docker_mainflux-base-net
|
|
volumes:
|
|
- mainflux-postgres-writer-volume:/var/lib/postgresql/data
|
|
|
|
postgres-writer:
|
|
image: mainflux/postgres-writer:latest
|
|
container_name: mainflux-postgres-writer
|
|
depends_on:
|
|
- postgres
|
|
restart: on-failure
|
|
environment:
|
|
MF_NATS_URL: ${MF_NATS_URL}
|
|
MF_POSTGRES_WRITER_LOG_LEVEL: ${MF_POSTGRES_WRITER_LOG_LEVEL}
|
|
MF_POSTGRES_WRITER_PORT: ${MF_POSTGRES_WRITER_PORT}
|
|
MF_POSTGRES_WRITER_DB_HOST: postgres
|
|
MF_POSTGRES_WRITER_DB_PORT: ${MF_POSTGRES_WRITER_DB_PORT}
|
|
MF_POSTGRES_WRITER_DB_USER: ${MF_POSTGRES_WRITER_DB_USER}
|
|
MF_POSTGRES_WRITER_DB_PASS: ${MF_POSTGRES_WRITER_DB_PASS}
|
|
MF_POSTGRES_WRITER_DB: ${MF_POSTGRES_WRITER_DB}
|
|
MF_POSTGRES_WRITER_DB_SSL_MODE: ${MF_POSTGRES_WRITER_DB_SSL_MODE}
|
|
MF_POSTGRES_WRITER_DB_SSL_CERT: ${MF_POSTGRES_WRITER_DB_SSL_CERT}
|
|
MF_POSTGRES_WRITER_DB_SSL_KEY: ${MF_POSTGRES_WRITER_DB_SSL_KEY}
|
|
MF_POSTGRES_WRITER_DB_SSL_ROOT_CERT: ${MF_POSTGRES_WRITER_DB_SSL_ROOT_CERT}
|
|
ports:
|
|
- ${MF_POSTGRES_WRITER_PORT}:${MF_POSTGRES_WRITER_PORT}
|
|
networks:
|
|
- docker_mainflux-base-net
|
|
volumes:
|
|
- ./config.toml:/config.toml
|