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
|
cd scripts && ./run.sh
|
||||||
|
|
||||||
run:
|
run:
|
||||||
docker-compose -f docker/docker-compose.yml -f docker/mproxy.yml up
|
docker-compose -f docker/docker-compose.yml up
|
||||||
|
|
||||||
runlora:
|
runlora:
|
||||||
docker-compose \
|
docker-compose \
|
||||||
|
@ -120,4 +120,4 @@ runlora:
|
||||||
|
|
||||||
# Run all Mainflux core services except distributed tracing system - Jaeger. Recommended on gateways:
|
# Run all Mainflux core services except distributed tracing system - Jaeger. Recommended on gateways:
|
||||||
rungw:
|
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:
|
Once the prerequisites are installed, execute the following commands from the project's root:
|
||||||
|
|
||||||
```bash
|
```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:
|
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-db-volume:
|
||||||
mainflux-things-redis-volume:
|
mainflux-things-redis-volume:
|
||||||
mainflux-es-redis-volume:
|
mainflux-es-redis-volume:
|
||||||
|
mainflux-mqtt-broker-volume:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
nginx:
|
nginx:
|
||||||
|
@ -41,6 +42,7 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
- things
|
- things
|
||||||
- users
|
- users
|
||||||
|
- mqtt-adapter
|
||||||
- http-adapter
|
- http-adapter
|
||||||
- ws-adapter
|
- ws-adapter
|
||||||
|
|
||||||
|
@ -200,6 +202,47 @@ services:
|
||||||
networks:
|
networks:
|
||||||
- mainflux-base-net
|
- 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:
|
ws-adapter:
|
||||||
image: mainflux/ws:latest
|
image: mainflux/ws:latest
|
||||||
container_name: mainflux-ws
|
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 &
|
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
|
# CoAP
|
||||||
|
|
Loading…
Reference in New Issue