Add frontend/nginx.conf

This commit is contained in:
Zac Gaetano 2026-04-14 09:21:14 -04:00
parent 3cf5a1afbb
commit 47ebf79794

33
frontend/nginx.conf Normal file
View file

@ -0,0 +1,33 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# SPA fallback
location / {
try_files $uri $uri/ /index.html;
}
# Proxy API to backend
location /api/ {
proxy_pass http://backend:8000/api/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
# Proxy WebSocket to backend
location /ws {
proxy_pass http://backend:8000/ws;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
# Proxy HLS segments to backend
location /hls/ {
proxy_pass http://backend:8000/hls/;
proxy_set_header Host $host;
}
}