feat: update components and hooks to use get_untracked for improved performance

This commit is contained in:
asepharyana
2026-07-04 03:03:36 +07:00
parent 8166023f91
commit 27e929580e
85 changed files with 1703 additions and 1843 deletions
-24
View File
@@ -1,24 +0,0 @@
# Nginx config for serving Vite-built static frontend files
server {
listen 3000;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Gzip compression for faster load times
gzip on;
gzip_types text/plain text/css application/json application/javascript image/svg+xml;
gzip_min_length 256;
# Cache static assets (JS/CSS hashed filenames)
location /assets/ {
expires 1y;
add_header Cache-Control "public, immutable";
}
# SPA fallback — all non-file routes serve index.html
location / {
try_files $uri $uri/ /index.html;
}
}
+22 -8
View File
@@ -1,7 +1,7 @@
# Docker DNS resolver (127.0.0.11 = Docker's embedded DNS).
# Required for variable-based proxy_pass below to resolve upstream
# hostnames on each request instead of caching them at startup.
# Without this, when backend/frontend containers are recreated (new IP),
# Without this, when backend containers are recreated (new IP),
# nginx keeps pointing to stale IPs → 502 Bad Gateway.
# Valid=10s re-resolves at most every 10 seconds to avoid excessive DNS queries.
resolver 127.0.0.11 ipv6=off valid=10s;
@@ -43,13 +43,27 @@ server {
proxy_send_timeout 86400s;
}
# Frontend SPA fallback
# WASM MIME type
types {
application/wasm wasm;
}
# Gzip for static assets
gzip on;
gzip_types text/plain text/css application/json application/javascript application/wasm image/svg+xml;
gzip_min_length 256;
# Cache static assets (JS/WASM hashed filenames)
location /assets/ {
root /usr/share/nginx/html;
expires 1y;
add_header Cache-Control "public, immutable";
}
# Frontend SPA fallback — serve static files directly
location / {
set $frontend_url "http://frontend:3000";
proxy_pass $frontend_url$uri$is_args$args;
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;
root /usr/share/nginx/html;
index index.html;
try_files $uri $uri/ /index.html;
}
}