MF-1648 - Add Default MF_BROKER_URL in env file (#1650)
* Initial commit Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com> * Remove nats and rabbitmq url Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com> * Remove broker url construction in makefile Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com> * Initial commit Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com> * Remove nats and rabbitmq url Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com> * Remove broker url construction in makefile Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com> * Remove if else statement in Makefile Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com> Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com> Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
This commit is contained in:
parent
8a4cc12cd3
commit
237826e253
11
Makefile
11
Makefile
|
@ -117,13 +117,6 @@ rundev:
|
|||
cd scripts && ./run.sh
|
||||
|
||||
run:
|
||||
ifeq ("$(MF_BROKER_TYPE)", "rabbitmq")
|
||||
sed -i "s,file: brokers/.*.yml,file: brokers/rabbitmq.yml," docker/docker-compose.yml
|
||||
sed -i "s,MF_BROKER_URL: .*,MF_BROKER_URL: $$\{MF_RABBITMQ_URL\}," docker/docker-compose.yml
|
||||
else ifeq ("$(MF_BROKER_TYPE)", "nats")
|
||||
sed -i "s,file: brokers/.*.yml,file: brokers/nats.yml," docker/docker-compose.yml
|
||||
sed -i "s,MF_BROKER_URL: .*,MF_BROKER_URL: $$\{MF_NATS_URL\}," docker/docker-compose.yml
|
||||
else
|
||||
echo "Invalid broker type"; exit 1
|
||||
endif
|
||||
sed -i "s,file: brokers/.*.yml,file: brokers/${MF_BROKER_TYPE}.yml," docker/docker-compose.yml
|
||||
sed -i "s,MF_BROKER_URL=.*,MF_BROKER_URL=$$\{MF_$(shell echo ${MF_BROKER_TYPE} | tr 'a-z' 'A-Z')_URL\}," docker/.env
|
||||
docker-compose -f docker/docker-compose.yml up
|
||||
|
|
|
@ -6,9 +6,6 @@ MF_NGINX_SSL_PORT=443
|
|||
MF_NGINX_MQTT_PORT=1883
|
||||
MF_NGINX_MQTTS_PORT=8883
|
||||
|
||||
# Message Broker
|
||||
MF_BROKER_TYPE=nats
|
||||
|
||||
## Nats
|
||||
MF_NATS_PORT=4222
|
||||
MF_NATS_URL=nats://broker:${MF_NATS_PORT}
|
||||
|
@ -22,6 +19,10 @@ MF_RABBITMQ_COOKIE=mainflux
|
|||
MF_RABBITMQ_VHOST=/
|
||||
MF_RABBITMQ_URL=amqp://${MF_RABBITMQ_USER}:${MF_RABBITMQ_PASS}@broker:${MF_RABBITMQ_PORT}${MF_RABBITMQ_VHOST}
|
||||
|
||||
# Message Broker
|
||||
MF_BROKER_TYPE=nats
|
||||
MF_BROKER_URL=${MF_NATS_URL}
|
||||
|
||||
## Redis
|
||||
MF_REDIS_TCP_PORT=6379
|
||||
|
||||
|
|
|
@ -287,7 +287,7 @@ services:
|
|||
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_BROKER_URL: ${MF_NATS_URL}
|
||||
MF_BROKER_URL: ${MF_BROKER_URL}
|
||||
MF_MQTT_ADAPTER_MQTT_TARGET_HOST: vernemq
|
||||
MF_MQTT_ADAPTER_MQTT_TARGET_PORT: ${MF_MQTT_BROKER_PORT}
|
||||
MF_MQTT_ADAPTER_MQTT_TARGET_HEALTH_CHECK: http://vernemq:8888/health
|
||||
|
@ -310,7 +310,7 @@ services:
|
|||
environment:
|
||||
MF_HTTP_ADAPTER_LOG_LEVEL: debug
|
||||
MF_HTTP_ADAPTER_PORT: ${MF_HTTP_ADAPTER_PORT}
|
||||
MF_BROKER_URL: ${MF_NATS_URL}
|
||||
MF_BROKER_URL: ${MF_BROKER_URL}
|
||||
MF_JAEGER_URL: ${MF_JAEGER_URL}
|
||||
MF_THINGS_AUTH_GRPC_URL: ${MF_THINGS_AUTH_GRPC_URL}
|
||||
MF_THINGS_AUTH_GRPC_TIMEOUT: ${MF_THINGS_AUTH_GRPC_TIMEOUT}
|
||||
|
@ -338,7 +338,7 @@ services:
|
|||
environment:
|
||||
MF_COAP_ADAPTER_LOG_LEVEL: ${MF_COAP_ADAPTER_LOG_LEVEL}
|
||||
MF_COAP_ADAPTER_PORT: ${MF_COAP_ADAPTER_PORT}
|
||||
MF_BROKER_URL: ${MF_NATS_URL}
|
||||
MF_BROKER_URL: ${MF_BROKER_URL}
|
||||
MF_JAEGER_URL: ${MF_JAEGER_URL}
|
||||
MF_THINGS_AUTH_GRPC_URL: ${MF_THINGS_AUTH_GRPC_URL}
|
||||
MF_THINGS_AUTH_GRPC_TIMEOUT: ${MF_THINGS_AUTH_GRPC_TIMEOUT}
|
||||
|
|
Loading…
Reference in New Issue