summaryrefslogtreecommitdiffhomepage
path: root/nginx.conf
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-03-15 15:46:00 +0900
committerAdam Malczewski <[email protected]>2026-03-15 15:46:00 +0900
commit0254a6936139801ee10fac27cc5032258d13051d (patch)
tree2169ab1a0d7c4979947f999e9e57a8e1be19b299 /nginx.conf
parente30116153f29ea8b634c31c080130f1a5d6f0d06 (diff)
downloadtirecalc-main.tar.gz
tirecalc-main.zip
update to work with dokployHEADmain
Diffstat (limited to 'nginx.conf')
-rw-r--r--nginx.conf29
1 files changed, 29 insertions, 0 deletions
diff --git a/nginx.conf b/nginx.conf
new file mode 100644
index 0000000..f36fef4
--- /dev/null
+++ b/nginx.conf
@@ -0,0 +1,29 @@
+server {
+ listen 80;
+ server_name _;
+
+ root /usr/share/nginx/html;
+ index index.html;
+
+ # Serve static files directly; fall back to index.html for SPA routing
+ location / {
+ try_files $uri $uri/ /index.html;
+ }
+
+ # Cache static assets aggressively (Vite hashes filenames)
+ location /assets/ {
+ expires 1y;
+ add_header Cache-Control "public, immutable";
+ }
+
+ # Don't log favicon/robots requests
+ location = /favicon.ico { access_log off; log_not_found off; }
+ location = /robots.txt { access_log off; log_not_found off; }
+
+ # Gzip compression for text-based assets
+ gzip on;
+ gzip_vary on;
+ gzip_proxied any;
+ gzip_comp_level 6;
+ gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml;
+}