Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker-compose.monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ services:
GF_SMTP_FROM_NAME: ${GF_SMTP_FROM_NAME:-Rythmify Monitoring}
GF_SMTP_STARTTLS_POLICY: MandatoryStartTLS
ALERT_EMAIL_TO: ${ALERT_EMAIL_TO:-}
GF_SERVER_ROOT_URL: https://rythmify-back.duckdns.org/grafana/
GF_SERVER_ROOT_URL: https://rythmify.duckdns.org/grafana/
GF_SERVER_SERVE_FROM_SUB_PATH: "true"
volumes:
- grafana_data:/var/lib/grafana
Expand Down
21 changes: 20 additions & 1 deletion nginx/rythmify.duckdns.org.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ server {
root /var/www/rythmify;
index index.html;

location /health {
proxy_pass http://localhost:8080/health;

proxy_http_version 1.1;
proxy_set_header Host $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;
}

# Backend API
location /api/ {
proxy_pass http://localhost:8080/api/;
Expand All @@ -40,13 +50,22 @@ server {
proxy_set_header Host $host;
}

# Grafana (MUST KEEP)
# Handle missing trailing slash
location = /grafana {
return 301 /grafana/;
}

# Grafana proxy
location /grafana/ {
proxy_pass http://localhost:3000/;

proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;

# Required for Grafana WebSockets
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}

# Frontend SPA
Expand Down
Loading