Files
DataStack/docker/coolify-nginx.conf
T
i vib e52e25e990 feat: add Coolify deployment proxy
Route the Coolify HTTPS domain through an internal Nginx proxy to Next.js and Socket.IO. Keep app/backing services private, preserve local development socket URLs, and document Coolify Compose setup.
2026-10-23 20:53:34 -07:00

43 lines
1.1 KiB
Plaintext

map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream nextjs_upstream {
server web:3000;
}
upstream socketio_upstream {
server ingestion:4000;
}
server {
listen 80;
server_name _;
client_max_body_size 50M;
location /socket.io/ {
proxy_pass http://socketio_upstream;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $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 $http_x_forwarded_proto;
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;
proxy_buffering off;
}
location / {
proxy_pass http://nextjs_upstream;
proxy_http_version 1.1;
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 $http_x_forwarded_proto;
}
}