Build & Deploy (Nix) / build-and-deploy (backend) (push) Successful in 3m14s
Build & Deploy (Nix) / build-and-deploy (discord-gateway) (push) Successful in 2m28s
Build & Deploy (Nix) / build-and-deploy (proxy) (push) Successful in 2m38s
127.0.0.1 from inside Docker container is the container's own loopback, not host's. Changed to listen 8080 (all interfaces) so Traefik can reach it via host.docker.internal:8080.
57 lines
1.5 KiB
Plaintext
57 lines
1.5 KiB
Plaintext
events {}
|
|
|
|
http {
|
|
include @NGINX_MIME@;
|
|
|
|
access_log /var/lib/gmw-proxy/nginx-access.log;
|
|
error_log /var/lib/gmw-proxy/nginx-error.log;
|
|
|
|
map $http_upgrade $connection_upgrade {
|
|
default upgrade;
|
|
'' close;
|
|
}
|
|
|
|
server {
|
|
listen 8080;
|
|
server_name _;
|
|
|
|
gzip on;
|
|
gzip_types text/plain text/css application/json application/javascript application/wasm image/svg+xml;
|
|
gzip_min_length 256;
|
|
|
|
location ^~ /api {
|
|
proxy_pass http://127.0.0.1:3001$uri$is_args$args;
|
|
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;
|
|
}
|
|
|
|
location ^~ /ws {
|
|
proxy_pass http://127.0.0.1:3001$uri$is_args$args;
|
|
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 $scheme;
|
|
proxy_buffering off;
|
|
proxy_read_timeout 86400s;
|
|
proxy_send_timeout 86400s;
|
|
}
|
|
|
|
location /assets/ {
|
|
root @FRONTEND_ROOT@;
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
location / {
|
|
root @FRONTEND_ROOT@;
|
|
index index.html;
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
}
|
|
}
|