diff proxy.yaml @ 0:0b5b4ede1bf5

start with a mockup of the debugging display
author drewp@bigasterisk.com
date Fri, 09 Aug 2024 15:09:22 -0700
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/proxy.yaml	Fri Aug 09 15:09:22 2024 -0700
@@ -0,0 +1,40 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: mqtt-metrics-nginx-conf
+data:
+  nginx.conf: |
+    error_log /dev/stderr;
+    pid /dev/null;
+    events {
+      worker_connections 64;
+    }
+    http {
+      log_format main '[$time_local] code=$status bytes_sent=$bytes_sent req="$request"';
+      proxy_headers_hash_bucket_size 128;
+      proxy_buffering off;
+      server {
+        access_log /dev/stderr main;
+
+        location = /metrics {
+          proxy_pass http://127.0.0.1:8001/metrics;
+        }
+        location = /mqtt-metrics/metrics {
+          proxy_pass http://127.0.0.1:8001/metrics;
+        }
+        location /mqtt-metrics/api/ {
+          proxy_pass http://127.0.0.1:8001/api/;
+        }
+
+        location = /mqtt-metrics/vite-ws {
+          proxy_pass http://127.0.0.1:8002/mqtt-metrics/vite-ws;
+          proxy_http_version 1.1;
+          proxy_set_header Upgrade $http_upgrade;
+          proxy_set_header Connection "Upgrade";
+        }
+
+        location /mqtt-metrics/ {
+          proxy_pass http://127.0.0.1:8002/mqtt-metrics/;
+        }
+      }
+    }