Update server configuration and Docker setup for improved deployment

This commit is contained in:
MayaTheShy
2026-03-21 17:15:04 -04:00
parent cc64b568a0
commit 2853ca98a0
4 changed files with 58 additions and 9 deletions

47
web/client/nginx.conf Normal file
View File

@@ -0,0 +1,47 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Serve static files, fallback to index.html for SPA routing
location / {
try_files $uri $uri/ /index.html;
}
# Proxy API requests to backend server
location /api/ {
proxy_pass http://server:3001/api/;
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 WebSocket for browser clients
location /ws {
proxy_pass http://server:3001/ws;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
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_read_timeout 86400s;
proxy_send_timeout 86400s;
}
# Proxy WebSocket for bridge clients
location /ws/bridge {
proxy_pass http://server:3001/ws/bridge;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
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_read_timeout 86400s;
proxy_send_timeout 86400s;
}
}