f2da1ad525
Vorher lief der Vite-ENTWICKLUNGSSERVER als Produktion, und vier Dateien riefen hartkodiert http://localhost:8000 auf — vom PC aus fragte der Browser damit den PC selbst nach Laufwerken (deshalb blieb das UI immer leer); Settings nutzte ein nie gesetztes VITE_API_URL. Die Logs-Seite zeigte fest einprogrammierte Fantasie-Einträge ("The Matrix gerippt"). - lib/api.ts: axios-Instanz mit baseURL /api; nginx proxied /api → api:8000 (ein Origin, kein CORS), SSE-tauglich (proxy_buffering off) - Dockerfile: Vite-Build → nginx:alpine statt npm run dev - Logs + LiveLog von echtem /logs-Endpoint; MetadataPreview: echte Laufwerke aus /devices statt erfundener /dev/bluray-Optionen, startet echten Job Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
26 lines
691 B
Nginx Configuration File
26 lines
691 B
Nginx Configuration File
# Rippy UI: statische Dateien + API-Proxy.
|
|
# /api/* wird an den api-Container durchgereicht (Präfix wird entfernt),
|
|
# alles andere ist das gebaute React-UI. Damit braucht der Browser nur
|
|
# EINEN Origin — kein hartkodiertes localhost, kein CORS-Gefrickel.
|
|
|
|
server {
|
|
listen 80;
|
|
server_name _;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
location /api/ {
|
|
proxy_pass http://api:8000/;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
# SSE (/api/stream/jobs) braucht ungepufferte, lange Verbindungen:
|
|
proxy_buffering off;
|
|
proxy_read_timeout 3600s;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri /index.html;
|
|
}
|
|
}
|