### Summary of Changes - **Version Metadata Generation**: - `ci/docker/www/Dockerfile` & `ci/docker/docs/Dockerfile` accept `COMMIT_SHA` and `VERSION` build args and write `/usr/share/nginx/html/version.json`. - `ci/config/nginx/default.conf` configures `location = /version.json` with `Cache-Control: no-store, no-cache, must-revalidate` so verification is never stale. - **Automated Rollout Verification**: - `.github/workflows/services-www-releases-dispatch-release.yml` - `.github/workflows/services-docs-next-required.yml` - `.github/workflows/services-www-next-required.yml` - Added `verify-rollout` job that polls `https://www.ermnvldmr.com/version.json` and `https://docs.ermnvldmr.com/version.json` with 10s intervals (up to 5 minutes) to ensure the commit actively rolls out to users.
57 lines
1.6 KiB
Plaintext
57 lines
1.6 KiB
Plaintext
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# Gzip compression
|
|
gzip on;
|
|
gzip_vary on;
|
|
gzip_proxied any;
|
|
gzip_comp_level 6;
|
|
gzip_types text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml;
|
|
|
|
# Root redirect: detect browser language, fallback to /en/
|
|
location = / {
|
|
set $locale "en";
|
|
if ($http_accept_language ~* "(^|,\s*)ru") {
|
|
set $locale "ru";
|
|
}
|
|
return 302 /$locale/;
|
|
}
|
|
|
|
# Cache hashed static assets (JS, CSS, fonts) — matched before locale prefix blocks
|
|
# root is inherited from server block, so /en/static/js/file.js resolves correctly
|
|
location ~* \.(js|css|woff|woff2|ttf|eot)$ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
# Cache images
|
|
location ~* \.(png|jpg|jpeg|gif|ico|svg)$ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, no-transform";
|
|
}
|
|
|
|
# English locale — SPA fallback for non-asset routes
|
|
location /en/ {
|
|
try_files $uri $uri/ $uri.html /en/index.html;
|
|
}
|
|
|
|
# Russian locale — SPA fallback for non-asset routes
|
|
location /ru/ {
|
|
try_files $uri $uri/ $uri.html /ru/index.html;
|
|
}
|
|
|
|
# Version probe for release rollout verification
|
|
location = /version.json {
|
|
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0" always;
|
|
add_header Content-Type "application/json" always;
|
|
try_files /version.json =404;
|
|
}
|
|
|
|
# Error pages
|
|
error_page 404 /en/index.html;
|
|
}
|