All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m10s
80 lines
1.7 KiB
Nginx Configuration File
80 lines
1.7 KiB
Nginx Configuration File
worker_processes auto;
|
|
|
|
pid /tmp/nginx.pid;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
# Logging
|
|
access_log off;
|
|
error_log /dev/stderr warn;
|
|
|
|
# Performance
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
tcp_nodelay on;
|
|
keepalive_timeout 65;
|
|
keepalive_requests 1000;
|
|
|
|
# Compression
|
|
gzip on;
|
|
gzip_vary on;
|
|
gzip_proxied any;
|
|
gzip_min_length 256;
|
|
gzip_comp_level 6;
|
|
gzip_types
|
|
text/plain
|
|
text/css
|
|
text/xml
|
|
text/javascript
|
|
application/javascript
|
|
application/x-javascript
|
|
application/json
|
|
application/xml
|
|
application/xml+rss
|
|
font/ttf
|
|
font/otf
|
|
image/svg+xml;
|
|
|
|
server {
|
|
listen 8080;
|
|
server_name localhost;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# Redirect root to default locale (de) - using relative redirect
|
|
location = / {
|
|
return 301 $scheme://$http_host/de/;
|
|
}
|
|
|
|
# Serve each locale
|
|
location ~ ^/(de|de-DE|en)/ {
|
|
try_files $uri $uri/ /$1/index.html;
|
|
}
|
|
|
|
# Fallback for any other routes to default locale
|
|
location / {
|
|
return 301 $scheme://$http_host/de$request_uri;
|
|
}
|
|
|
|
# Static Assets Caching
|
|
location ~* \.(?:ico|css|js|gif|jpe?g|png|woff2?|eot|ttf|svg|map)$ {
|
|
expires 1y;
|
|
access_log off;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
# Optional: Explicit asset route
|
|
location /assets/ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
}
|
|
}
|