0
|
1 apiVersion: v1
|
|
2 kind: ConfigMap
|
|
3 metadata:
|
|
4 name: pi-mqtt-nginx-conf
|
|
5 data:
|
|
6 nginx.conf: |
|
|
7 error_log /dev/stderr;
|
|
8 pid /dev/null;
|
|
9 events {
|
1
|
10 worker_connections 64;
|
0
|
11 }
|
|
12 http {
|
|
13 log_format main '[$time_local] code=$status bytes_sent=$bytes_sent req="$request"';
|
|
14 proxy_headers_hash_bucket_size 128;
|
|
15 proxy_buffering off;
|
|
16 server {
|
1
|
17 access_log off;
|
0
|
18
|
|
19 location = /metrics {
|
|
20 proxy_pass http://127.0.0.1:8001/metrics;
|
3
|
21 }
|
|
22 location = /health {
|
|
23 proxy_pass http://127.0.0.1:8001/health;
|
0
|
24 }
|
1
|
25 location = /pi-mqtt/metrics {
|
|
26 proxy_pass http://127.0.0.1:8001/metrics;
|
|
27 }
|
0
|
28 location /pi-mqtt/api/ {
|
|
29 proxy_pass http://127.0.0.1:8001/api/;
|
|
30 }
|
|
31
|
|
32 location = /pi-mqtt/vite-ws {
|
|
33 proxy_pass http://127.0.0.1:8002/pi-mqtt/vite-ws;
|
|
34 proxy_http_version 1.1;
|
|
35 proxy_set_header Upgrade $http_upgrade;
|
|
36 proxy_set_header Connection "Upgrade";
|
|
37 }
|
|
38
|
|
39 location /pi-mqtt/ {
|
|
40 proxy_pass http://127.0.0.1:8002/pi-mqtt/;
|
|
41 }
|
|
42 }
|
1
|
43 }
|