Files
cbsnexora/nginx.spa.conf
satyamsingh_8888 c6e9ec049e
Tests / testRigor (push) Canceled after 0s
build-run / Run Lint, Build and Deploy (push) Canceled after 0s
Publish Image in Docker Hub / build (push) Canceled after 0s
Playwright E2E Tests / Run Playwright Tests (push) Canceled after 0s
Add Drone CI pipeline and static-only nginx serving for dev deploy
2026-09-14 13:36:38 +05:30

46 lines
1.5 KiB
Plaintext

# Static-only nginx config for the CBSNexora Angular UI.
# NOTE: No API reverse-proxy here by design — the browser calls the Fineract
# backend directly via FINERACT_API_URL (env.js). nginx sirf static files
# serve karta hai + Angular SPA routing handle karta hai.
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# ---- Compression ----
gzip on;
gzip_comp_level 6;
gzip_min_length 1024;
gzip_proxied any;
gzip_types text/plain text/css application/javascript application/json
application/xml image/svg+xml font/woff font/woff2;
# ---- Runtime env: env.js aur index.html kabhi cache na ho ----
# (env.js har container start par envsubst se regenerate hoti hai;
# index.html hashed asset filenames point karti hai)
location = /assets/env.js {
add_header Cache-Control "no-store, no-cache, must-revalidate";
expires -1;
}
location = /index.html {
add_header Cache-Control "no-store, no-cache, must-revalidate";
expires -1;
}
# ---- Hashed static assets: lambe time cache ----
location ~* \.(?:js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
expires 7d;
add_header Cache-Control "public";
try_files $uri =404;
}
# ---- Angular SPA fallback: har route index.html par ----
location / {
try_files $uri $uri/ /index.html;
}
}