* Add archived state for commanders across all layers * Add `tick` import and smooth scrollIntoView to commander and game edit flows Replace `setTimeout` with `await tick()` when scrolling forms into view. Update `startEdit` functions in `/commanders` and `/games` to use the new `tick` import. Replace hardcoded 100ms timeout with `tick` and ensure `bind:this` is applied to form elements before scrolling. * Add `tick` import and smooth scrollIntoView to commander and game edit flows Replace `setTimeout` with `await tick()` when scrolling forms into view. Update `startEdit` functions in `/commanders` and `/games` to use the new `tick` import. Replace hardcoded 100ms timeout with `tick` and ensure `bind:this` is applied to form elements before scrolling. * Add cache control headers for version.txt and handle HTML files explicitly * Refactor buttons to use icon-button component Update Start/Stop/Reset controls to use the new `icon-button` class. Replace text-only buttons with a consistent pattern of SVG icon followed by a `<span>` label. Add corresponding CSS rules for `.icon-button` and `.btn-icon` to ensure proper spacing and sizing. * feat: change reset button icon and bump version - Update reset button SVG to a circular arrow icon - Decrease reset icon size to 1.15rem - Bump version to 2.3.2 in static file * Add support for displaying archived commanders count Bump application version to 2.3.3 Refine round counter button disabled state and styling * Add color icon assets and update version number feat: Add color icon assets (W, U, B, R, G, C) and increment version to 2.3.4 * Add color icon assets and update version number feat: Add color icon assets (W, U, B, R, G, C) and increment version to 2.3.4 * Update color assets from SVG to PNG and refresh image files Replace all `.svg` color icons (W, U, B, R, G, C) with corresponding `.png` files. Add new asset `timer.png` and `commanders.png`. Remove `round_timer.png`, `stats.png`, and `logs.png`. Replace `logs.png` with an updated version. Bump version number from 2.3.4 to 2.3.5. * Update commander profile card styling and replace placeholder icons ``` Update commander profile card styling and replace placeholder icons - Revert white background and padding for the main container - Increase icon chip dimensions to 90% width and height - Remove border and inset shadow from color chip icons - Replace generic SVG placeholders (B, C, G, R, U, W) with new designs ``` * Update footer to remove version prefix and add commander images
133 lines
3.8 KiB
Plaintext
133 lines
3.8 KiB
Plaintext
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
|
'$status $body_bytes_sent "$http_referer" '
|
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
|
|
|
access_log /var/log/nginx/access.log main;
|
|
error_log /var/log/nginx/error.log error;
|
|
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
tcp_nodelay on;
|
|
keepalive_timeout 65;
|
|
types_hash_max_size 2048;
|
|
|
|
gzip on;
|
|
gzip_vary on;
|
|
gzip_min_length 1024;
|
|
gzip_proxied any;
|
|
gzip_comp_level 6;
|
|
gzip_types
|
|
text/plain
|
|
text/css
|
|
text/xml
|
|
text/javascript
|
|
application/json
|
|
application/javascript
|
|
application/xml+rss
|
|
application/atom+xml
|
|
image/svg+xml;
|
|
|
|
# Rate limiting
|
|
limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;
|
|
limit_req_zone $binary_remote_addr zone=static:10m rate=30r/s;
|
|
|
|
# Use resolver to dynamically resolve backend hostname
|
|
# This allows backend container to start after frontend
|
|
resolver 127.0.0.11 valid=10s;
|
|
|
|
server {
|
|
listen 80;
|
|
server_name _;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# Set backend upstream address (resolved dynamically)
|
|
set $backend_backend "backend:3000";
|
|
|
|
# Rate limited API proxy
|
|
location /api/ {
|
|
limit_req zone=api burst=20 nodelay;
|
|
proxy_pass http://$backend_backend;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection 'upgrade';
|
|
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_cache_bypass $http_upgrade;
|
|
proxy_read_timeout 86400;
|
|
}
|
|
|
|
# Hashed CSS files (cache-busted)
|
|
location ~* ^/css/.*\.css$ {
|
|
limit_req zone=static burst=50 nodelay;
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
# Hashed JS files (cache-busted)
|
|
location ~* ^/js/.*\.(js|mjs)$ {
|
|
limit_req zone=static burst=50 nodelay;
|
|
expires 1d;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
# Regular static files (non-hashed)
|
|
location ~* \.(png|jpg|jpeg|gif|ico|svg|webp|woff|woff2)$ {
|
|
limit_req zone=static burst=50 nodelay;
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
# Version file endpoint
|
|
location = /version.txt {
|
|
access_log off;
|
|
add_header Cache-Control "no-store, no-cache, must-revalidate";
|
|
add_header Pragma "no-cache";
|
|
add_header Expires "0";
|
|
}
|
|
|
|
# Explicitly handle HTML files - don't fallback to index.html
|
|
location ~* \.html$ {
|
|
limit_req zone=static burst=10 nodelay;
|
|
try_files $uri =404;
|
|
}
|
|
|
|
# Main application routes
|
|
location / {
|
|
limit_req zone=static burst=10 nodelay;
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
# Health check endpoint
|
|
location /health {
|
|
access_log off;
|
|
return 200 "healthy\n";
|
|
add_header Content-Type text/plain;
|
|
}
|
|
|
|
# Error pages
|
|
error_page 404 /404.html;
|
|
error_page 500 502 503 504 /50x.html;
|
|
|
|
location = /404.html {
|
|
root /usr/share/nginx/html;
|
|
internal;
|
|
}
|
|
|
|
location = /50x.html {
|
|
root /usr/share/nginx/html;
|
|
internal;
|
|
}
|
|
}
|
|
}
|