Add GooseFarm frontend proxy configuration
All checks were successful
Deploy Nginx Config to Ubuntu Server / deploy (push) Successful in 2s

- Add /goosefarm location block for Next.js frontend
- Proxy to localhost:3001
- Support WebSocket upgrades for Next.js hot reload
- Add to both HTTP (80) and HTTPS (443) server blocks
This commit is contained in:
happybell80 2025-11-03 21:36:39 +09:00
parent 412793901a
commit 323250c12f

View File

@ -51,6 +51,19 @@ server {
try_files $uri $uri/ /index.html; try_files $uri $uri/ /index.html;
} }
# GooseFarm Frontend
location /goosefarm {
proxy_pass http://localhost:3001/;
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_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
}
# API endpoints -> route to gateway (host 8100 -> container 8000) # API endpoints -> route to gateway (host 8100 -> container 8000)
location /api/ { location /api/ {
proxy_pass http://localhost:8100; proxy_pass http://localhost:8100;
@ -187,6 +200,19 @@ server {
try_files $uri $uri/ /index.html; try_files $uri $uri/ /index.html;
} }
# GooseFarm Frontend
location /goosefarm {
proxy_pass http://localhost:3001/;
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_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
}
# API endpoints -> route to gateway (host 8100 -> container 8000) # API endpoints -> route to gateway (host 8100 -> container 8000)
location /api/ { location /api/ {
proxy_pass http://localhost:8100; proxy_pass http://localhost:8100;