fix: update.sh Frontend-Deployment — standalone server.js Pfad korrekt ermitteln

This commit is contained in:
sysops
2026-03-17 19:51:21 +01:00
parent adffff7ee1
commit 4f0670d94c
+3 -1
View File
@@ -104,7 +104,9 @@ log "Backend eingespielt"
info "Spiele Frontend ein (standalone)..."
mkdir -p "$FRONTEND_DIR"
rsync -a --delete "$BUILD_DIR/.next/standalone/" "$FRONTEND_DIR/"
# Next.js standalone mirrors the absolute build path — find the dir that contains server.js
STANDALONE_ROOT=$(dirname "$(find "$BUILD_DIR/.next/standalone" -name "server.js" | head -1)")
rsync -a --delete "$STANDALONE_ROOT/" "$FRONTEND_DIR/"
mkdir -p "$FRONTEND_DIR/.next/static"
rsync -a --delete "$BUILD_DIR/.next/static/" "$FRONTEND_DIR/.next/static/"
if [[ -d "$BUILD_DIR/public" ]]; then