mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-01 09:29:38 +02:00
29 lines
664 B
Nginx Configuration File
29 lines
664 B
Nginx Configuration File
|
|
server {
|
||
|
|
listen 80;
|
||
|
|
server_name _;
|
||
|
|
root /usr/share/nginx/html;
|
||
|
|
index index.html;
|
||
|
|
|
||
|
|
# SPA routing
|
||
|
|
location / {
|
||
|
|
try_files $uri $uri/ /index.html;
|
||
|
|
}
|
||
|
|
|
||
|
|
# API proxy to gateway
|
||
|
|
location /api/v1/ {
|
||
|
|
proxy_pass http://gateway:8088;
|
||
|
|
proxy_set_header Host $host;
|
||
|
|
proxy_set_header X-Real-IP $remote_addr;
|
||
|
|
}
|
||
|
|
|
||
|
|
# WebSocket proxy
|
||
|
|
location /api/v1/socket {
|
||
|
|
proxy_pass http://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;
|
||
|
|
}
|
||
|
|
}
|