Files
homelab-armonia/nginx.conf
kiskaadee 75dc033448 feat(sites): add Homelab Sites orchestration for Armonía del Ser
- Add Schema v1.0 app.yaml manifest for armonia.roadtotech.me
- Add multistage Dockerfile.dashboard (Node 22 pnpm -> Nginx 1.27
  Alpine) and nginx.conf with /api/ proxy and Authelia header forwarding
- Configure docker-compose.yml with Traefik public/protected routers,
  /api prefix stripping, and SQLite volume persistance
- Document environment variables and Turso driver normalization tracking
  (armonia-api#11)

Refs: armonia-del-ser/.profile#2
2026-10-19 15:47:55 -05:00

40 lines
1.3 KiB
Nginx Configuration File

server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Compression for static assets
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml text/javascript image/svg+xml;
gzip_min_length 256;
# Internal reverse proxy fallback for /api/* -> armonia-api:8000/*
# Preserves Authelia ForwardAuth headers (Remote-Email, Remote-User, Remote-Groups, Remote-Name)
location /api/ {
proxy_pass http://armonia-api: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;
proxy_set_header Remote-User $http_remote_user;
proxy_set_header Remote-Email $http_remote_email;
proxy_set_header Remote-Name $http_remote_name;
proxy_set_header Remote-Groups $http_remote_groups;
}
#Immutable Vite hashed assets
location /assets/ {
expires 1y;
add_header Cache-Control "public, immutable";
try_files $uri =404;
}
# SPA fallback routing
location / {
try_files $uri $uri/ /index.html;
}
}