Merged MQTT docker compose in core composition file (#1060)
Signed-off-by: Nikola Marcetic <n.marcetic86@gmail.com>
This commit is contained in:
parent
7df2ababc4
commit
d587921eda
4
Makefile
4
Makefile
|
@ -110,7 +110,7 @@ rundev:
|
|||
cd scripts && ./run.sh
|
||||
|
||||
run:
|
||||
docker-compose -f docker/docker-compose.yml -f docker/mproxy.yml up
|
||||
docker-compose -f docker/docker-compose.yml up
|
||||
|
||||
runlora:
|
||||
docker-compose \
|
||||
|
@ -120,4 +120,4 @@ runlora:
|
|||
|
||||
# Run all Mainflux core services except distributed tracing system - Jaeger. Recommended on gateways:
|
||||
rungw:
|
||||
MF_JAEGER_URL= docker-compose -f docker/docker-compose.yml -f docker/mproxy.yml up --scale jaeger=0
|
||||
MF_JAEGER_URL= docker-compose -f docker/docker-compose.yml up --scale jaeger=0
|
||||
|
|
|
@ -53,7 +53,7 @@ Developing Mainflux will also require:
|
|||
Once the prerequisites are installed, execute the following commands from the project's root:
|
||||
|
||||
```bash
|
||||
docker-compose -f docker/docker-compose.yml -f docker/mproxy.yml up
|
||||
docker-compose -f docker/docker-compose.yml up
|
||||
```
|
||||
|
||||
This will bring up the Mainflux docker services and interconnect them. This command can also be executed using the project's included Makefile:
|
||||
|
|
|
@ -13,6 +13,7 @@ volumes:
|
|||
mainflux-things-db-volume:
|
||||
mainflux-things-redis-volume:
|
||||
mainflux-es-redis-volume:
|
||||
mainflux-mqtt-broker-volume:
|
||||
|
||||
services:
|
||||
nginx:
|
||||
|
@ -41,6 +42,7 @@ services:
|
|||
depends_on:
|
||||
- things
|
||||
- users
|
||||
- mqtt-adapter
|
||||
- http-adapter
|
||||
- ws-adapter
|
||||
|
||||
|
@ -200,6 +202,47 @@ services:
|
|||
networks:
|
||||
- mainflux-base-net
|
||||
|
||||
vernemq:
|
||||
image: mainflux/vernemq:1.10.1-alpine
|
||||
container_name: mainflux-vernemq
|
||||
restart: on-failure
|
||||
environment:
|
||||
DOCKER_VERNEMQ_ALLOW_ANONYMOUS: "on"
|
||||
DOCKER_VERNEMQ_LOG__CONSOLE__LEVEL: info
|
||||
ports:
|
||||
- 18831:${MF_MQTT_BROKER_PORT}
|
||||
- 8881:${MF_MQTT_BROKER_WS_PORT}
|
||||
- 7777:8888
|
||||
networks:
|
||||
- mainflux-base-net
|
||||
volumes:
|
||||
- mainflux-mqtt-broker-volume:/var/lib/vernemq
|
||||
|
||||
mqtt-adapter:
|
||||
image: mainflux/mqtt:latest
|
||||
container_name: mainflux-mqtt
|
||||
depends_on:
|
||||
- vernemq
|
||||
- things
|
||||
- nats
|
||||
restart: on-failure
|
||||
environment:
|
||||
MF_MQTT_ADAPTER_LOG_LEVEL: ${MF_MQTT_ADAPTER_LOG_LEVEL}
|
||||
MF_MQTT_ADAPTER_PORT: ${MF_MQTT_ADAPTER_PORT}
|
||||
MF_MQTT_ADAPTER_WS_PORT: ${MF_MQTT_ADAPTER_WS_PORT}
|
||||
MF_MQTT_ADAPTER_ES_URL: es-redis:${MF_REDIS_TCP_PORT}
|
||||
MF_NATS_URL: ${MF_NATS_URL}
|
||||
MF_THINGS_URL: things:${MF_THINGS_AUTH_GRPC_PORT}
|
||||
MF_JAEGER_URL: ${MF_JAEGER_URL}
|
||||
MF_MQTT_ADAPTER_MQTT_TARGET_HOST: vernemq
|
||||
MF_MQTT_ADAPTER_MQTT_TARGET_PORT: ${MF_MQTT_BROKER_PORT}
|
||||
ports:
|
||||
- 18832:${MF_MQTT_ADAPTER_PORT}
|
||||
- 8882:${MF_MQTT_ADAPTER_WS_PORT}
|
||||
networks:
|
||||
- mainflux-base-net
|
||||
|
||||
|
||||
ws-adapter:
|
||||
image: mainflux/ws:latest
|
||||
container_name: mainflux-ws
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
# Copyright (c) Mainflux
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
version: "3.7"
|
||||
|
||||
volumes:
|
||||
mainflux-mqtt-broker-volume:
|
||||
|
||||
services:
|
||||
nginx:
|
||||
depends_on:
|
||||
- mqtt-adapter
|
||||
|
||||
vernemq:
|
||||
image: mainflux/vernemq:1.10.1-alpine
|
||||
container_name: mainflux-vernemq
|
||||
restart: on-failure
|
||||
environment:
|
||||
DOCKER_VERNEMQ_ALLOW_ANONYMOUS: "on"
|
||||
DOCKER_VERNEMQ_LOG__CONSOLE__LEVEL: info
|
||||
ports:
|
||||
- 18831:${MF_MQTT_BROKER_PORT}
|
||||
- 8881:${MF_MQTT_BROKER_WS_PORT}
|
||||
- 7777:8888
|
||||
networks:
|
||||
- mainflux-base-net
|
||||
volumes:
|
||||
- mainflux-mqtt-broker-volume:/var/lib/vernemq
|
||||
|
||||
mqtt-adapter:
|
||||
image: mainflux/mqtt:latest
|
||||
container_name: mainflux-mqtt
|
||||
depends_on:
|
||||
- vernemq
|
||||
- things
|
||||
- nats
|
||||
restart: on-failure
|
||||
environment:
|
||||
MF_MQTT_ADAPTER_LOG_LEVEL: ${MF_MQTT_ADAPTER_LOG_LEVEL}
|
||||
MF_MQTT_ADAPTER_PORT: ${MF_MQTT_ADAPTER_PORT}
|
||||
MF_MQTT_ADAPTER_WS_PORT: ${MF_MQTT_ADAPTER_WS_PORT}
|
||||
MF_MQTT_ADAPTER_ES_URL: es-redis:${MF_REDIS_TCP_PORT}
|
||||
MF_NATS_URL: ${MF_NATS_URL}
|
||||
MF_THINGS_URL: things:${MF_THINGS_AUTH_GRPC_PORT}
|
||||
MF_JAEGER_URL: ${MF_JAEGER_URL}
|
||||
MF_MQTT_ADAPTER_MQTT_TARGET_HOST: vernemq
|
||||
MF_MQTT_ADAPTER_MQTT_TARGET_PORT: ${MF_MQTT_BROKER_PORT}
|
||||
ports:
|
||||
- 18832:${MF_MQTT_ADAPTER_PORT}
|
||||
- 8882:${MF_MQTT_ADAPTER_WS_PORT}
|
||||
networks:
|
||||
- mainflux-base-net
|
|
@ -56,9 +56,9 @@ MF_HTTP_ADAPTER_LOG_LEVEL=info MF_HTTP_ADAPTER_PORT=8185 MF_THINGS_URL=localhost
|
|||
MF_WS_ADAPTER_LOG_LEVEL=info MF_WS_ADAPTER_PORT=8186 MF_THINGS_URL=localhost:8183 $BUILD_DIR/mainflux-ws &
|
||||
|
||||
###
|
||||
# MQTT mproxy
|
||||
# MQTT
|
||||
###
|
||||
MF_MQTT_ADAPTER_LOG_LEVEL=info MF_THINGS_URL=localhost:8183 $BUILD_DIR/mainflux-mproxy &
|
||||
MF_MQTT_ADAPTER_LOG_LEVEL=info MF_THINGS_URL=localhost:8183 $BUILD_DIR/mainflux-mqtt &
|
||||
|
||||
###
|
||||
# CoAP
|
||||
|
|
Loading…
Reference in New Issue