Files
papryk-com/nginx.conf
Patryk Koreń ff707dd762 cos tam dziala
2026-07-06 23:17:37 +02:00

30 lines
726 B
Nginx Configuration File

server {
listen 80;
# =========================
# FRONTEND (Vite)
# =========================
location / {
proxy_pass http://frontend:5173;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
# =========================
# BACKEND (Bun API)
# =========================
location /api/ {
rewrite ^/api/(.*)$ /$1 break;
proxy_pass http://backend:3000;
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;
}
}