Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
3 changes: 2 additions & 1 deletion deployment/portable/docker-compose.infrastructure-cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@ services:
- ./grafana/provisioning:/etc/grafana/provisioning
- ${XYNE_DATA_DIR:-./data}/grafana-storage:/var/lib/grafana
ports:
- "3002:3000"
- "3000"
restart: always
networks:
- xyne
environment:
- POSTGRES_USER=xyne
- POSTGRES_PASSWORD=xyne
- GF_SERVER_ROOT_URL=%(protocol)s://%(domain)s:%(http_port)s/grafana

vespa:
image: vespaengine/vespa:latest
Expand Down
3 changes: 2 additions & 1 deletion deployment/portable/docker-compose.infrastructure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@ services:
- ./grafana/provisioning:/etc/grafana/provisioning
- ${XYNE_DATA_DIR:-./data}/grafana-storage:/var/lib/grafana
ports:
- "3002:3000"
- "3000"
restart: always
networks:
- xyne
environment:
- POSTGRES_USER=xyne
- POSTGRES_PASSWORD=xyne
- GF_SERVER_ROOT_URL=%(protocol)s://%(domain)s:%(http_port)s/grafana

vespa:
image: xyne-vespa-gpu
Expand Down
29 changes: 26 additions & 3 deletions deployment/portable/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ http {
keepalive 8;
}

# Grafana backend
upstream grafana_backend {
server xyne-grafana:3000;
keepalive 16;
}

# Main HTTP server
server {
listen 80;
Expand Down Expand Up @@ -201,8 +207,8 @@ http {
access_log off;
}

# Static files with caching
location ~* \.(css|js|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
# Static files with caching (excluding Grafana paths)
location ~* ^/(?!grafana/).*\.(css|js|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
proxy_pass http://app_backend;
proxy_http_version 1.1;
proxy_set_header Host $host;
Expand All @@ -215,5 +221,22 @@ http {
add_header Cache-Control "public, immutable";
access_log off;
}

# Redirect /grafana to /grafana/
location = /grafana {
return 301 /grafana/;
}

# Grafana routes (must come after static files to ensure proper handling)
location /grafana/ {
proxy_pass http://grafana_backend/;
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;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
}
}