Add Drone CI pipeline and static-only nginx serving for dev deploy
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
# 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user