chore(nginx): stop tracking the generated site config
Some checks failed
Deploy to Production / Trigger production update (push) Failing after 11s

nginx/conf.d/pvemanager.conf is not source: setup_nginx_config() writes it
on every deploy by copying one of the .template files and substituting the
domain. Tracking it meant the repository carried one deployment's hostname,
and every deploy showed the file as modified.

Untrack it and ignore it. The templates it is generated from stay tracked,
so nothing is lost — a missing copy is restored by re-running deploy.sh, or
by hand:

    cp nginx/conf.d/pvemanager.conf.template nginx/conf.d/pvemanager.conf
    sed -i "s/DOMAIN_NAME/<domain>/g" nginx/conf.d/pvemanager.conf

Note for existing checkouts: this commit deletes the path, so a deployed
host that pulls it will lose its live config unless the file is regenerated
afterwards.
This commit is contained in:
2026-08-11 21:10:09 +05:00
parent 0662dda6ae
commit c981a14cf9
2 changed files with 3 additions and 87 deletions

3
.gitignore vendored
View File

@@ -29,6 +29,9 @@ systemd/
# Let's Encrypt state written by certbot (contains private keys — never commit)
nginx/certbot/
# Generated per deployment by setup_nginx_config() from the .template files,
# with the domain substituted in — deployment state, not source.
nginx/conf.d/pvemanager.conf
# Environment
.env

View File

@@ -1,87 +0,0 @@
# NGINX Configuration Template for Server Panel (HTTP only, no SSL)
# Replace pve.cloudly.uz with your actual domain or server IP
server {
listen 80;
listen [::]:80;
server_name pve.cloudly.uz;
# Logging
access_log /var/log/nginx/pvemanager_access.log;
error_log /var/log/nginx/pvemanager_error.log;
# Let's Encrypt challenge (needed for SSL certificate obtaining)
location /.well-known/acme-challenge/ {
root /var/www/certbot;
try_files $uri =404;
}
# Rate limiting
limit_req zone=general burst=20 nodelay;
limit_conn addr 10;
# Health check endpoint
location /health {
proxy_pass http://pvemanager-app:8000;
access_log off;
}
# API proxy
location /api/ {
limit_req zone=api burst=50 nodelay;
proxy_pass http://pvemanager-app:8000;
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 $scheme;
}
# Proxmox API proxy
location /proxmox/ {
proxy_pass http://pvemanager-app:8000;
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 $scheme;
# Загрузка ISO/образов: файлы многогигабайтные, дефолтный
# client_max_body_size 100M и короткие таймауты им не подходят.
client_max_body_size 20g;
proxy_read_timeout 300s;
proxy_send_timeout 300s;
client_body_timeout 3600s;
}
# WebSocket support — tasks и terminal
location ~ ^/(ws|proxmox/ws)/ {
proxy_pass http://pvemanager-app:8000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header 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_read_timeout 86400;
proxy_send_timeout 86400;
}
# Backend static files (legacy, logo, etc.)
location /static/ {
proxy_pass http://pvemanager-app:8000;
proxy_cache_valid 200 1d;
expires 1d;
add_header Cache-Control "public, immutable";
}
# SPA frontend — all other routes
location / {
proxy_pass http://pvemanager-frontend:80;
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 $scheme;
}
}