From 47ebf797947cc7fd8fff532d08b293e12a7d14d9 Mon Sep 17 00:00:00 2001 From: Zac Gaetano Date: Tue, 14 Apr 2026 09:21:14 -0400 Subject: [PATCH] Add frontend/nginx.conf --- frontend/nginx.conf | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 frontend/nginx.conf diff --git a/frontend/nginx.conf b/frontend/nginx.conf new file mode 100644 index 0000000..f427757 --- /dev/null +++ b/frontend/nginx.conf @@ -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; + } +}