Sin headers, el navegador cacheaba el HTML de entrada y los deploys nuevos no se veían hasta limpiar caché (el caso del botón de Alta Afluencia). Los assets de Vite llevan hash y no se afectan.
65 lines
1.8 KiB
Plaintext
65 lines
1.8 KiB
Plaintext
# FRASA Ecosystem — nginx del host (modo HTTP, LAN)
|
|
# Instalado en /etc/nginx/sites-available/frasa
|
|
|
|
# index.html siempre se revalida (los assets de Vite llevan hash en el nombre,
|
|
# así que solo el HTML necesita no-cache para que los deploys se vean al momento)
|
|
map $uri $frasa_cache_control {
|
|
~*\.html$ "no-cache";
|
|
default "";
|
|
}
|
|
|
|
server {
|
|
listen 80 default_server;
|
|
server_name _;
|
|
|
|
client_max_body_size 10m;
|
|
|
|
add_header Cache-Control $frasa_cache_control always;
|
|
|
|
# API Gateway (servicio systemd frasa-api en 127.0.0.1:3000)
|
|
location /api/ {
|
|
proxy_pass http://127.0.0.1:3000;
|
|
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;
|
|
}
|
|
|
|
# Apps estáticas (builds de producción)
|
|
location /quote/ {
|
|
alias /root/frasa-ecosystem/apps/cotizador/dist/;
|
|
try_files $uri $uri/ /quote/index.html;
|
|
}
|
|
|
|
location /client/ {
|
|
alias /root/frasa-ecosystem/apps/alta-clientes/dist/;
|
|
try_files $uri $uri/ /client/index.html;
|
|
}
|
|
|
|
location /pay/ {
|
|
alias /root/frasa-ecosystem/apps/cobranza/dist/;
|
|
try_files $uri $uri/ /pay/index.html;
|
|
}
|
|
|
|
location /ai/ {
|
|
alias /root/frasa-ecosystem/apps/agente-ia/dist/;
|
|
try_files $uri $uri/ /ai/index.html;
|
|
}
|
|
|
|
location /dash/ {
|
|
alias /root/frasa-ecosystem/apps/dashboards/dist/;
|
|
try_files $uri $uri/ /dash/index.html;
|
|
}
|
|
|
|
location /hoy/ {
|
|
alias /root/frasa-ecosystem/apps/mi-dia/dist/;
|
|
try_files $uri $uri/ /hoy/index.html;
|
|
}
|
|
|
|
# Landing (raíz)
|
|
location / {
|
|
root /root/frasa-ecosystem/apps/landing/dist;
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
}
|