fix(frontend): public/ ins Standalone-Image kopieren (Synoptik-GLBs 404) - #56
Merged
Merged
Conversation
Next.js output:"standalone" übernimmt public/ NICHT automatisch; das Dockerfile kopierte bisher nur das Standalone-Bundle + die statischen Assets (Kommentar: "kein public/"). Seit der 3D-Linie (#55) liegen die Maschinen-GLBs + der Draco-Decoder unter frontend/public/synoptik/ → auf dem Deploy 404, der Renderer fällt still auf Platzhalter zurück. Fix: public/ explizit ins Runner-Stage kopieren. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughDas Frontend-Dockerfile kopiert das Projekt- ChangesNext.js-Runtime-Assets
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Auf der deployten Frontend-URL zeigt die 3D-Linie nur Platzhalter — die Browser-Konsole meldet 404 auf alle
/synoptik/models/*.glb. Der Renderer lädt die GLBs asynchron und fällt bei einem Fehler bewusst auf den Platzhalter zurück (stille Degradation), daher kein sichtbarer Crash.Ursache
next.config.tsnutztoutput: "standalone". Der Standalone-Output übernimmtpublic/NICHT automatisch — das muss das Dockerfile explizit tun. Dasfrontend/Dockerfilekopierte aber nur.next/standalone+.next/static(Kommentar damals: „Das Repo hat KEIN public/-Verzeichnis → wird nicht kopiert").Mit der 3D-Linie (#55) liegen erstmals echte Runtime-Assets unter
frontend/public/synoptik/(die Maschinen-GLBs und der Draco-Decoder). Die fehlen im Image → 404 auf dem Deploy. Lokal (next dev) fällt das nicht auf, weil dortpublic/direkt vom Projekt-Root serviert wird.Fix
Eine Zeile im Runner-Stage:
COPY --from=builder --chown=node:node /app/public ./public.dockerignoreschließtpublic/nicht aus, der Standalone-Server serviert./publicrelativ zuserver.js— damit laden GLBs + Draco-Decoder.Nach dem Merge — Frontend redeployen
Das Frontend ist nicht GitHub-gekoppelt (Railway baut aus dem Dockerfile via Upload). Der Merge auf
maindeployt es nicht automatisch. Danach nötig:mainlokal ziehen.frontend/neu deployen (railway upbzw. Redeploy im Railway-Dashboard für den Frontend-Service).Das neue Image enthält dann
public/synoptik/→ die GLBs erscheinen.🤖 Generated with Claude Code
Summary by CodeRabbit
public/-Verzeichnis werden jetzt im Frontend-Container mit ausgeliefert.