mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-01 01:19:38 +02:00
42 lines
1.2 KiB
Nginx Configuration File
42 lines
1.2 KiB
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name _;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# Use Docker's internal DNS resolver with short cache
|
|
resolver 127.0.0.11 valid=10s ipv6=off;
|
|
|
|
# SPA routing
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
# API proxy to gateway
|
|
location /api/v1/ {
|
|
set $upstream_gateway gateway;
|
|
proxy_pass http://$upstream_gateway:8088;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
}
|
|
|
|
# Effect RPC WebSocket proxy
|
|
location /api/v1/rpc {
|
|
set $upstream_gateway gateway;
|
|
proxy_pass http://$upstream_gateway:8088;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_set_header Host $host;
|
|
proxy_read_timeout 86400;
|
|
}
|
|
|
|
# Browser OTLP proxy (client posts /otel/v1/*, collector listens on 4318)
|
|
location /otel/ {
|
|
set $upstream_otel otel-collector;
|
|
rewrite ^/otel/(.*)$ /$1 break;
|
|
proxy_pass http://$upstream_otel:4318;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
}
|
|
}
|