Mainflux.mainflux/docker/verne-cluster.yml

73 lines
1.8 KiB
YAML

# Copyright (c) Mainflux
# SPDX-License-Identifier: Apache-2.0
version: "3.7"
x-mqtt-adapter: &mqtt-adapter
image: mainflux/mqtt-verne:latest
depends_on:
- things
- nats
restart: on-failure
environment: &mqtt-adapter-env
MF_MQTT_ADAPTER_LOG_LEVEL: ${MF_MQTT_ADAPTER_LOG_LEVEL}
MF_MQTT_INSTANCE_ID: mqtt-adapter-1
MF_MQTT_ADAPTER_ES_URL: tcp://es-redis:${MF_REDIS_TCP_PORT}
MF_NATS_URL: ${MF_NATS_URL}
MF_THINGS_AUTH_GRPC_URL: http://things:${MF_THINGS_AUTH_GRPC_PORT}
DOCKER_VERNEMQ_PLUGINS__VMQ_PASSWD: "off"
DOCKER_VERNEMQ_PLUGINS__VMQ_ACL: "off"
DOCKER_VERNEMQ_PLUGINS__MFX_AUTH: "on"
DOCKER_VERNEMQ_PLUGINS__MFX_AUTH__PATH: /mainflux/_build/default
DOCKER_VERNEMQ_LOG__CONSOLE__LEVEL: debug
MF_MQTT_VERNEMQ_GRPC_POOL_SIZE: 1000
networks:
- mainflux-base-net
services:
nginx:
environment:
MF_MQTT_CLUSTER: 1
depends_on:
- mqtt-adapter-1
- mqtt-adapter-2
- mqtt-adapter-3
mqtt-adapter-1:
<< : *mqtt-adapter
container_name: mainflux-mqtt-1
ports:
- 18831:${MF_MQTT_ADAPTER_PORT}
- 8891:${MF_MQTT_ADAPTER_WS_PORT}
- 7777:8888
mqtt-adapter-2:
<< : *mqtt-adapter
container_name: mainflux-mqtt-2
environment:
<< : *mqtt-adapter-env
DOCKER_VERNEMQ_COMPOSE: 1
DOCKER_VERNEMQ_DISCOVERY_NODE: mqtt-adapter-1
ports:
- 18832:1883
- 8892:8080
- 7778:8888
depends_on:
- mqtt-adapter-1
mqtt-adapter-3:
<< : *mqtt-adapter
container_name: mainflux-mqtt-3
environment:
<< : *mqtt-adapter-env
DOCKER_VERNEMQ_COMPOSE: 1
DOCKER_VERNEMQ_DISCOVERY_NODE: mqtt-adapter-1
ports:
- 18833:1883
- 8893:8080
- 7779:8888
depends_on:
- mqtt-adapter-1