Skip to content

Commit

Permalink
Remove multiple stream directives
Browse files Browse the repository at this point in the history
Signed-off-by: felix.gateru <[email protected]>
  • Loading branch information
felixgateru committed Apr 4, 2024
1 parent 65452d9 commit 03636b5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 25 deletions.
12 changes: 4 additions & 8 deletions docker/nginx/nginx-key.conf
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,13 @@ http {
}
}

# MQTT
stream {
include snippets/stream_access_log.conf;

# MQTT
# Include single-node or multiple-node (cluster) upstream
include snippets/mqtt-upstream.conf;

server {
listen ${MG_NGINX_MQTT_PORT};
listen [::]:${MG_NGINX_MQTT_PORT};
Expand All @@ -205,13 +205,8 @@ stream {

proxy_pass mqtt_cluster;
}
}

# CoAP
stream {
include snippets/stream_access_log.conf;

# Include upstream
# CoAP
include snippets/coap-upstream.conf;

server {
Expand All @@ -225,4 +220,5 @@ stream {
proxy_pass coap_cluster;
}
}

error_log info.log info;
21 changes: 6 additions & 15 deletions docker/nginx/nginx-x509.conf
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,14 @@ stream {

js_import authorization from /etc/nginx/authorization.js;

# Include single-node or multiple-node (cluster) upstream
include snippets/mqtt-upstream.conf;
ssl_verify_client on;
include snippets/ssl-client.conf;

# MQTT
# Include single-node or multiple-node (cluster) upstream
include snippets/mqtt-upstream.conf;


server {
listen ${MG_NGINX_MQTT_PORT};
listen [::]:${MG_NGINX_MQTT_PORT};
Expand All @@ -226,21 +229,9 @@ stream {

proxy_pass mqtt_cluster;
}
}

#CoAP
stream {
include snippets/stream_access_log.conf;

# Include JS script for mTLS
js_path "/etc/nginx/njs/";

js_import authorization from /etc/nginx/authorization.js;

# Include upstream
# CoAP
include snippets/coap-upstream.conf;
ssl_verify_client on;
include snippets/ssl-client.conf;

server {
listen ${MF_NGINX_COAP_PORT};
Expand Down
4 changes: 2 additions & 2 deletions docker/nginx/snippets/coap-upstream.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# SPDX-License-Identifier: Apache-2.0

upstream coap_cluster {
server coap-adapter:${MF_COAP_ADAPTER_HTTP_PORT};
}
server coap-adapter:5683;
}

0 comments on commit 03636b5

Please sign in to comment.