From 04a0b5b1bea18a6ae0f1413f0804519b522757c3 Mon Sep 17 00:00:00 2001 From: Evan Richardson Date: Sun, 2 Sep 2018 23:40:56 -0700 Subject: [PATCH] Added MQTT Broker IP and PORT ENV options (-e MQTT_BROKER_IP and MQTT_BROKER_PORT) --- Docker/src/conf/broker.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Docker/src/conf/broker.py b/Docker/src/conf/broker.py index 73cbf39..e98be06 100644 --- a/Docker/src/conf/broker.py +++ b/Docker/src/conf/broker.py @@ -1,11 +1,12 @@ +import os #=========================================================================== # # MQTT message broker location. Default broker location is port 1883 # for regular and 8883 for SSL. # #=========================================================================== -host = '192.168.1.20' -port = 31333 +host = os.getenv('MQTT_BROKER_IP', '192.168.1.18') +port = os.getenv('MQTT_BROKER_PORT', 31333) # Keep alive time in seconds. Client sends a ping if no other message # is sent in this interval.