diff --git a/.env b/.env index ee5b971ba5..828a28f621 100644 --- a/.env +++ b/.env @@ -78,7 +78,7 @@ MF_HTTP_ADAPTER_PORT=8185 ### MQTT MF_MQTT_ADAPTER_LOG_LEVEL=debug -MF_MQTT_ADAPTER_PORT=1883 +MF_MQTT_ADAPTER_MQTT_PORT=1883 MF_MQTT_BROKER_PORT=1883 MF_MQTT_ADAPTER_WS_PORT=8080 MF_MQTT_BROKER_WS_PORT=8080 diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 2ec4993a46..c8585faae5 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -225,7 +225,7 @@ services: 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_MQTT_PORT: ${MF_MQTT_ADAPTER_MQTT_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} diff --git a/docker/nginx/entrypoint.sh b/docker/nginx/entrypoint.sh index f91341ac24..1df02be923 100755 --- a/docker/nginx/entrypoint.sh +++ b/docker/nginx/entrypoint.sh @@ -2,10 +2,10 @@ if [ -z "$MF_MQTT_CLUSTER" ] then - envsubst '${MF_MQTT_ADAPTER_PORT}' < /etc/nginx/snippets/mqtt-upstream-single.conf > /etc/nginx/snippets/mqtt-upstream.conf + envsubst '${MF_MQTT_ADAPTER_MQTT_PORT}' < /etc/nginx/snippets/mqtt-upstream-single.conf > /etc/nginx/snippets/mqtt-upstream.conf envsubst '${MF_MQTT_ADAPTER_WS_PORT}' < /etc/nginx/snippets/mqtt-ws-upstream-single.conf > /etc/nginx/snippets/mqtt-ws-upstream.conf else - envsubst '${MF_MQTT_ADAPTER_PORT}' < /etc/nginx/snippets/mqtt-upstream-cluster.conf > /etc/nginx/snippets/mqtt-upstream.conf + envsubst '${MF_MQTT_ADAPTER_MQTT_PORT}' < /etc/nginx/snippets/mqtt-upstream-cluster.conf > /etc/nginx/snippets/mqtt-upstream.conf envsubst '${MF_MQTT_ADAPTER_WS_PORT}' < /etc/nginx/snippets/mqtt-ws-upstream-cluster.conf > /etc/nginx/snippets/mqtt-ws-upstream.conf fi diff --git a/docker/nginx/snippets/mqtt-upstream-cluster.conf b/docker/nginx/snippets/mqtt-upstream-cluster.conf index 3165729499..2a490eb96f 100644 --- a/docker/nginx/snippets/mqtt-upstream-cluster.conf +++ b/docker/nginx/snippets/mqtt-upstream-cluster.conf @@ -3,7 +3,7 @@ upstream mqtt_cluster { least_conn; - server mqtt-adapter-1:${MF_MQTT_ADAPTER_PORT}; - server mqtt-adapter-2:${MF_MQTT_ADAPTER_PORT}; - server mqtt-adapter-3:${MF_MQTT_ADAPTER_PORT}; + server mqtt-adapter-1:${MF_MQTT_ADAPTER_MQTT_PORT}; + server mqtt-adapter-2:${MF_MQTT_ADAPTER_MQTT_PORT}; + server mqtt-adapter-3:${MF_MQTT_ADAPTER_MQTT_PORT}; } \ No newline at end of file diff --git a/docker/nginx/snippets/mqtt-upstream-single.conf b/docker/nginx/snippets/mqtt-upstream-single.conf index 67a0828b6d..1517b80081 100644 --- a/docker/nginx/snippets/mqtt-upstream-single.conf +++ b/docker/nginx/snippets/mqtt-upstream-single.conf @@ -2,5 +2,5 @@ # SPDX-License-Identifier: Apache-2.0 upstream mqtt_cluster { - server mqtt-adapter:${MF_MQTT_ADAPTER_PORT}; + server mqtt-adapter:${MF_MQTT_ADAPTER_MQTT_PORT}; } \ No newline at end of file