File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ services:
7070 GF_SMTP_FROM_NAME : ${GF_SMTP_FROM_NAME:-Rythmify Monitoring}
7171 GF_SMTP_STARTTLS_POLICY : MandatoryStartTLS
7272 ALERT_EMAIL_TO : ${ALERT_EMAIL_TO:-}
73- GF_SERVER_ROOT_URL : https://rythmify-back .duckdns.org/grafana/
73+ GF_SERVER_ROOT_URL : https://rythmify.duckdns.org/grafana/
7474 GF_SERVER_SERVE_FROM_SUB_PATH : " true"
7575 volumes :
7676 - grafana_data:/var/lib/grafana
Original file line number Diff line number Diff line change @@ -19,6 +19,16 @@ server {
1919 root /var/www/rythmify;
2020 index index.html;
2121
22+ location /health {
23+ proxy_pass http://localhost:8080/health;
24+
25+ proxy_http_version 1.1;
26+ proxy_set_header Host $host;
27+ proxy_set_header X-Real-IP $remote_addr;
28+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
29+ proxy_set_header X-Forwarded-Proto $scheme;
30+ }
31+
2232 # Backend API
2333 location /api/ {
2434 proxy_pass http://localhost:8080/api/;
@@ -40,13 +50,22 @@ server {
4050 proxy_set_header Host $host;
4151 }
4252
43- # Grafana (MUST KEEP)
53+ # Handle missing trailing slash
54+ location = /grafana {
55+ return 301 /grafana/;
56+ }
57+
58+ # Grafana proxy
4459 location /grafana/ {
4560 proxy_pass http://localhost:3000/;
4661
4762 proxy_http_version 1.1;
4863 proxy_set_header Host $host;
4964 proxy_set_header X-Real-IP $remote_addr;
65+
66+ # Required for Grafana WebSockets
67+ proxy_set_header Upgrade $http_upgrade;
68+ proxy_set_header Connection "upgrade";
5069 }
5170
5271 # Frontend SPA
You can’t perform that action at this time.
0 commit comments