From d5115c2d58ca434ab1b37c26fbd7c41599ba39e6 Mon Sep 17 00:00:00 2001 From: Amritanshu Date: Thu, 13 Jul 2023 15:04:43 +0530 Subject: [PATCH] Fix: Grafana url --- iot/files/nginx.conf.j2 | 28 ++-------------------------- iot/playbook.yml | 2 +- 2 files changed, 3 insertions(+), 27 deletions(-) diff --git a/iot/files/nginx.conf.j2 b/iot/files/nginx.conf.j2 index 050269b..adda7a2 100644 --- a/iot/files/nginx.conf.j2 +++ b/iot/files/nginx.conf.j2 @@ -3,36 +3,12 @@ server { listen 80; server_name {{ http_host }}; - map $http_upgrade $connection_upgrade { - default upgrade; - '' close; - } - - location /mqtt/ { - proxy_pass http://localhost:9001/; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $connection_upgrade; - proxy_set_header Host $host; - } - - location /node-red/ { - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_pass http://localhost:1880/; - } - - location /dashboard/ { + location / { proxy_set_header Host $http_host; proxy_pass http://localhost:3005/; } - location /dashboard/api/live/ { + location /api/live/ { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; diff --git a/iot/playbook.yml b/iot/playbook.yml index 0b73f52..2b9f196 100755 --- a/iot/playbook.yml +++ b/iot/playbook.yml @@ -196,7 +196,7 @@ restart_policy: "unless-stopped" user: "{{ getent_passwd[user][1] }}:{{ getent_passwd[user][2] }}" env: - GF_SERVER_ROOT_URL: "https://{{ http_host }}/dashboard" + GF_SERVER_ROOT_URL: "https://{{ http_host }}" GF_INSTALL_PLUGINS: "grafana-clock-panel, grafana-simple-json-datasource, natel-discrete-panel, briangann-gauge-panel, vonage-status-panel, neocat-cal-heatmap-panel, natel-plotly-panel" links: - "{{ influx_container }}:influx"