deploy: nginx liefert React-PWA-Build statt Backend-Proxy auf /
CI / backend-tests (push) Successful in 55s
CI / frontend-build (push) Successful in 7m16s

/api/ geht weiter an Uvicorn, / serviert frontend/dist mit try_files-Fallback
auf index.html (react-router-dom routet im Client).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L85hmKbvX7Cqkq47KnQhFt
This commit is contained in:
2026-09-04 00:24:58 +02:00
co-authored by Claude Sonnet 5
parent f2ca0ed905
commit 3ecca4cd09
+10 -1
View File
@@ -23,11 +23,20 @@ server {
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
} }
location / { location /api/ {
proxy_pass http://127.0.0.1:8000; proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
} }
# React-PWA (Sprint 7): statische Build-Ausgabe von frontend/dist.
# try_files statt 404 bei Client-Routen, da react-router-dom im Browser routet.
root /var/www/mabea;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
} }