Fix: Grafana url

This commit is contained in:
Amritanshu Agrawal 2023-07-13 15:04:43 +05:30
parent 774b69be38
commit d5115c2d58
2 changed files with 3 additions and 27 deletions

View File

@ -3,36 +3,12 @@ server {
listen 80; listen 80;
server_name {{ http_host }}; server_name {{ http_host }};
map $http_upgrade $connection_upgrade { location / {
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/ {
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
proxy_pass http://localhost:3005/; proxy_pass http://localhost:3005/;
} }
location /dashboard/api/live/ { location /api/live/ {
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade"; proxy_set_header Connection "upgrade";

View File

@ -196,7 +196,7 @@
restart_policy: "unless-stopped" restart_policy: "unless-stopped"
user: "{{ getent_passwd[user][1] }}:{{ getent_passwd[user][2] }}" user: "{{ getent_passwd[user][1] }}:{{ getent_passwd[user][2] }}"
env: 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" 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: links:
- "{{ influx_container }}:influx" - "{{ influx_container }}:influx"