Files
homarr/nginx.conf
T
copilot-swe-agent[bot]andajnart c8ae7f283a feat: implement custom Next.js server with integrated WebSocket (POC)
- Create apps/nextjs/server.ts custom server integrating WebSocket via ws
- Update nextjs scripts to use custom server for dev and start
- Update root start script to remove separate ws server process
- Update client tRPC URL to connect to port 3000 in dev
- Update nginx.conf to route /websockets to port 3000
- Update Dockerfile and run.sh for integrated server
- Disable standalone ws server dev script
- Add benchmark-memory.sh script

Co-authored-by: ajnart <49837342+ajnart@users.noreply.github.com>
2026-02-28 08:58:34 +00:00

30 lines
875 B
Nginx Configuration File

events {
worker_connections 1024;
}
http {
server {
listen 7575;
listen [::]:7575;
# Route websockets traffic to port 3000 (integrated custom server)
location /websockets {
proxy_pass http://${HOSTNAME}:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $http_host;
}
# Route all other traffic to port 3000
location / {
proxy_pass http://${HOSTNAME}:3000;
proxy_set_header Host $http_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 $http_x_forwarded_proto;
client_max_body_size 32M;
}
}
}