79 lines
3.7 KiB
YAML
79 lines
3.7 KiB
YAML
# Copyright (c) Mainflux
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# This docker-compose file contains optional MongoDB-reader service
|
|
# for Mainflux platform. Since these are optional, this file is dependent of docker-compose file
|
|
# from <project_root>/docker. In order to run this service, execute command:
|
|
# docker-compose -f docker/docker-compose.yml -f docker/addons/mongodb-reader/docker-compose.yml up
|
|
# from project root. MongoDB service is defined in docker/addons/mongodb-writer/docker-compose.yml.
|
|
|
|
version: "3.7"
|
|
|
|
networks:
|
|
mainflux-base-net:
|
|
|
|
services:
|
|
mongodb-reader:
|
|
image: mainflux/mongodb-reader:${MF_RELEASE_TAG}
|
|
container_name: mainflux-mongodb-reader
|
|
restart: on-failure
|
|
environment:
|
|
MF_MONGO_READER_LOG_LEVEL: ${MF_MONGO_READER_LOG_LEVEL}
|
|
MF_MONGO_READER_HTTP_HOST: ${MF_MONGO_READER_HTTP_HOST}
|
|
MF_MONGO_READER_HTTP_PORT: ${MF_MONGO_READER_HTTP_PORT}
|
|
MF_MONGO_READER_HTTP_SERVER_CERT: ${MF_MONGO_READER_HTTP_SERVER_CERT}
|
|
MF_MONGO_READER_HTTP_SERVER_KEY: ${MF_MONGO_READER_HTTP_SERVER_KEY}
|
|
MF_MONGO_HOST: ${MF_MONGO_HOST}
|
|
MF_MONGO_PORT: ${MF_MONGO_PORT}
|
|
MF_MONGO_NAME: ${MF_MONGO_NAME}
|
|
MF_THINGS_AUTH_GRPC_URL: ${MF_THINGS_AUTH_GRPC_URL}
|
|
MF_THINGS_AUTH_GRPC_TIMEOUT: ${MF_THINGS_AUTH_GRPC_TIMEOUT}
|
|
MF_THINGS_AUTH_GRPC_CLIENT_CERT: ${MF_THINGS_AUTH_GRPC_CLIENT_CERT:+/things-grpc-client.crt}
|
|
MF_THINGS_AUTH_GRPC_CLIENT_KEY: ${MF_THINGS_AUTH_GRPC_CLIENT_KEY:+/things-grpc-client.key}
|
|
MF_THINGS_AUTH_GRPC_SERVER_CA_CERTS: ${MF_THINGS_AUTH_GRPC_SERVER_CA_CERTS:+/things-grpc-server-ca.crt}
|
|
MF_AUTH_GRPC_URL: ${MF_AUTH_GRPC_URL}
|
|
MF_AUTH_GRPC_TIMEOUT: ${MF_AUTH_GRPC_TIMEOUT}
|
|
MF_AUTH_GRPC_CLIENT_CERT: ${MF_AUTH_GRPC_CLIENT_CERT:+/users-grpc-client.crt}
|
|
MF_AUTH_GRPC_CLIENT_KEY: ${MF_AUTH_GRPC_CLIENT_KEY:+/users-grpc-client.key}
|
|
MF_AUTH_GRPC_SERVER_CA_CERTS: ${MF_AUTH_GRPC_SERVER_CA_CERTS:+/users-grpc-server-ca.crt}
|
|
MF_JAEGER_URL: ${MF_JAEGER_URL}
|
|
MF_SEND_TELEMETRY: ${MF_SEND_TELEMETRY}
|
|
MF_MONGO_READER_INSTANCE_ID: ${MF_MONGO_READER_INSTANCE_ID}
|
|
ports:
|
|
- ${MF_MONGO_READER_HTTP_PORT}:${MF_MONGO_READER_HTTP_PORT}
|
|
networks:
|
|
- mainflux-base-net
|
|
volumes:
|
|
- ../../ssl/certs:/etc/ssl/certs
|
|
# Users gRPC client certificates
|
|
- type: bind
|
|
source: ${MF_ADDONS_CERTS_PATH_PREFIX}${MF_USERS_GRPC_CLIENT_CERT:-./ssl/certs/dummy/client_cert}
|
|
target: /users-grpc-client${MF_USERS_GRPC_CLIENT_CERT:+.crt}
|
|
bind:
|
|
create_host_path: true
|
|
- type: bind
|
|
source: ${MF_ADDONS_CERTS_PATH_PREFIX}${MF_USERS_GRPC_CLIENT_KEY:-./ssl/certs/dummy/client_key}
|
|
target: /users-grpc-client${MF_USERS_GRPC_CLIENT_KEY:+.key}
|
|
bind:
|
|
create_host_path: true
|
|
- type: bind
|
|
source: ${MF_ADDONS_CERTS_PATH_PREFIX}${MF_USERS_GRPC_SERVER_CA_CERTS:-./ssl/certs/dummy/server_ca}
|
|
target: /users-grpc-server-ca${MF_USERS_GRPC_SERVER_CA_CERTS:+.crt}
|
|
bind:
|
|
create_host_path: true
|
|
- type: bind
|
|
source: ${MF_ADDONS_CERTS_PATH_PREFIX}${MF_THINGS_AUTH_GRPC_CLIENT_CERT:-./ssl/certs/dummy/client_cert}
|
|
target: /things-grpc-client${MF_THINGS_AUTH_GRPC_CLIENT_CERT:+.crt}
|
|
bind:
|
|
create_host_path: true
|
|
- type: bind
|
|
source: ${MF_ADDONS_CERTS_PATH_PREFIX}${MF_THINGS_AUTH_GRPC_CLIENT_KEY:-./ssl/certs/dummy/client_key}
|
|
target: /things-grpc-client${MF_THINGS_AUTH_GRPC_CLIENT_KEY:+.key}
|
|
bind:
|
|
create_host_path: true
|
|
- type: bind
|
|
source: ${MF_ADDONS_CERTS_PATH_PREFIX}${MF_THINGS_AUTH_GRPC_SERVER_CA_CERTS:-./ssl/certs/dummy/server_ca}
|
|
target: /things-grpc-server-ca${MF_THINGS_AUTH_GRPC_SERVER_CA_CERTS:+.crt}
|
|
bind:
|
|
create_host_path: true
|