Root cause: Docker container was 4 days old and nginx had no try_files fallback for SPA routes like /details. Changes: - Add nginx.conf with try_files $uri $uri/ /index.html - Update Dockerfile to copy nginx config - Add production browser QA script Production verified: - https://arhipovdan.ru/ shows full-screen 3D demo - https://arhipovdan.ru/details shows detailed page
21 lines
383 B
Nginx Configuration File
21 lines
383 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
location /assets/ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
location /models/ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
}
|