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.
This commit is contained in:
1 parent
fcc4f4db2d
commit
e52e25e990
6 files changed
+92
-21
No files matched your search
@@ -0,0 +1,42 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user