diff --git a/.next-dev/dev/cache/turbopack/v16.4.1-7217011a/00000198.sst b/.next-dev/dev/cache/turbopack/v16.4.1-7217011a/00000198.sst deleted file mode 100644 index 72ad3b6..0000000 Binary files a/.next-dev/dev/cache/turbopack/v16.4.1-7217011a/00000198.sst and /dev/null differ diff --git a/.next-dev/dev/cache/turbopack/v16.4.1-7217011a/00000199.meta b/.next-dev/dev/cache/turbopack/v16.4.1-7217011a/00000199.meta deleted file mode 100644 index 8829ebe..0000000 Binary files a/.next-dev/dev/cache/turbopack/v16.4.1-7217011a/00000199.meta and /dev/null differ diff --git a/.next-dev/dev/cache/turbopack/v16.4.1-7217011a/CURRENT b/.next-dev/dev/cache/turbopack/v16.4.1-7217011a/CURRENT index 31fcd3b..228cbc3 100644 --- a/.next-dev/dev/cache/turbopack/v16.4.1-7217011a/CURRENT +++ b/.next-dev/dev/cache/turbopack/v16.4.1-7217011a/CURRENT @@ -1 +1 @@ -{"max_sequence_number":208,"commit_time":"2026-11-07T12:59:21.231298Z"} +{"max_sequence_number":219,"commit_time":"2026-11-07T13:07:40.989233Z"} diff --git a/.next-dev/dev/cache/turbopack/v16.4.1-7217011a/LOG b/.next-dev/dev/cache/turbopack/v16.4.1-7217011a/LOG index 8373da3..988d4f9 100644 --- a/.next-dev/dev/cache/turbopack/v16.4.1-7217011a/LOG +++ b/.next-dev/dev/cache/turbopack/v16.4.1-7217011a/LOG @@ -420,3 +420,22 @@ FAM | META SEQ | SST SEQ | RANGE 0 | 00000206 | 00000205 SST | O | c44bdff4074eecdb-c44bdff4074eecdb (0 MiB, fresh, 38 bytes, 1 entries, 0 tombstones) 2 | 00000207 | 00000203 SST | [==================================================================================================] | 001063cd318b3038-ffb9adaf821da039 (1 MiB, fresh, 1165805 bytes, 1081 entries, 0 tombstones) 1 | 00000208 | 00000204 SST | [==================================================================================================] | 000484ce92df92ac-fff6eacc326864ce (5 MiB, fresh, 5771009 bytes, 11248 entries, 0 tombstones) +Time 2026-11-07T13:07:40.91322Z +Commit 00000216 4355 keys in 22ms 517µs +FAM | META SEQ | SST SEQ | RANGE + 0 | 00000213 | 00000212 SST | O | c44bdff4074eecdb-c44bdff4074eecdb (0 MiB, fresh, 38 bytes, 1 entries, 0 tombstones) + 3 | 00000214 | 00000211 SST | [=================================================================================================] | 00bccfc4663a6a51-fd54f898dc9465c1 (0 MiB, fresh, 441 bytes, 34 entries, 0 tombstones) + 2 | 00000215 | 00000210 SST | [=================================================================================================] | 043ae9add83f0db9-ff078261c00f822a (0 MiB, fresh, 231825 bytes, 49 entries, 0 tombstones) + 1 | 00000216 | 00000209 SST | [==================================================================================================] | 002a086171a1e285-fff4006622dda77f (3 MiB, fresh, 3770157 bytes, 4271 entries, 0 tombstones) + 3 | 00000218 | Compaction: + 3 | 00000218 | MERGE (104 keys): + 3 | 00000218 | 00000198 INPUT | [===============================================================================================] | 03bb1b83ec79fb6f-f9a082714d56784d + 3 | 00000218 | 00000211 INPUT | [=================================================================================================] | 00bccfc4663a6a51-fd54f898dc9465c1 + 3 | 00000218 | 00000217 OUTPUT | [=================================================================================================] | 00bccfc4663a6a51-fd54f898dc9465c1 (compacted) +Time 2026-11-07T13:07:40.980477Z +Commit 00000219 104 keys in 13ms 120µs +FAM | META SEQ | SST SEQ | RANGE + 3 | 00000218 | 00000217 SST | [=================================================================================================] | 00bccfc4663a6a51-fd54f898dc9465c1 (0 MiB, compacted, 1281 bytes, 104 entries, 0 tombstones) + 3 | 00000218 | 00000198 00000211 OBSOLETE SST + | | 00000198 00000211 SST DELETED + | | 00000199 00000214 META DELETED diff --git a/.next-dev/dev/trace b/.next-dev/dev/trace index c35e45a..cc8e21a 100644 --- a/.next-dev/dev/trace +++ b/.next-dev/dev/trace @@ -1,2 +1,4 @@ [{"name":"hot-reloader","duration":35,"timestamp":1068643705560,"id":3,"parentId":1,"tags":{"version":"16.4.1"},"startTime":1794056357203,"traceId":"af8a14a195f439a9"},{"name":"setup-dev-bundler","duration":429262,"timestamp":1068643552700,"id":2,"parentId":1,"tags":{},"startTime":1794056357051,"traceId":"af8a14a195f439a9"},{"name":"start-dev-server","duration":778479,"timestamp":1068643257949,"id":1,"tags":{"cpus":"12","platform":"darwin","memory.freeMem":"151339008","memory.totalMem":"17179869184","memory.heapSizeLimit":"8640266240","rage-restart":false,"missing-next-dir":false},"startTime":1794056356756,"traceId":"af8a14a195f439a9"},{"name":"compile-path","duration":782682,"timestamp":1068644158139,"id":5,"parentId":1,"tags":{"trigger":"/"},"startTime":1794056357656,"traceId":"af8a14a195f439a9"}] [{"name":"ensure-page","duration":783324,"timestamp":1068644157936,"id":4,"parentId":3,"tags":{"inputPage":"/page"},"startTime":1794056357656,"traceId":"af8a14a195f439a9"},{"name":"render-path","duration":541243,"timestamp":1068645060648,"id":7,"parentId":1,"tags":{"path":"/"},"startTime":1794056358558,"traceId":"af8a14a195f439a9"},{"name":"handle-request","duration":660086,"timestamp":1068644942253,"id":6,"parentId":1,"tags":{"url":"/"},"startTime":1794056358440,"traceId":"af8a14a195f439a9"},{"name":"memory-usage","duration":1,"timestamp":1068645602390,"id":8,"parentId":6,"tags":{"url":"/","memory.rss":"654475264","memory.heapUsed":"148601360","memory.heapTotal":"171261952"},"startTime":1794056359100,"traceId":"af8a14a195f439a9"},{"name":"ensure-page","duration":2959,"timestamp":1068645667903,"id":9,"parentId":3,"tags":{"inputPage":"/page"},"startTime":1794056359166,"traceId":"af8a14a195f439a9"},{"name":"render-path","duration":139534,"timestamp":1068645671725,"id":11,"parentId":1,"tags":{"path":"/"},"startTime":1794056359169,"traceId":"af8a14a195f439a9"},{"name":"handle-request","duration":140342,"timestamp":1068645671088,"id":10,"parentId":1,"tags":{"url":"/"},"startTime":1794056359169,"traceId":"af8a14a195f439a9"},{"name":"memory-usage","duration":1,"timestamp":1068645811461,"id":12,"parentId":10,"tags":{"url":"/","memory.rss":"714653696","memory.heapUsed":"159534920","memory.heapTotal":"191168512"},"startTime":1794056359309,"traceId":"af8a14a195f439a9"},{"name":"turbopack-persistence","duration":65000,"timestamp":1068647672738,"id":13,"parentId":3,"tags":{"reason":"idle timeout","snapshot_duration_ms":9.164291,"persist_duration_ms":56.416624999999996,"task_count":3897,"bytes_written":7078024,"bytes_deleted":0},"startTime":1794056361171,"traceId":"af8a14a195f439a9"}] +[{"name":"ensure-page","duration":186616,"timestamp":1068696922185,"id":15,"parentId":3,"tags":{"inputPage":"/page"},"startTime":1794056410420,"traceId":"af8a14a195f439a9"},{"name":"render-path","duration":146999,"timestamp":1068697111054,"id":17,"parentId":1,"tags":{"path":"/"},"startTime":1794056410609,"traceId":"af8a14a195f439a9"},{"name":"handle-request","duration":149627,"timestamp":1068697109462,"id":16,"parentId":1,"tags":{"url":"/"},"startTime":1794056410607,"traceId":"af8a14a195f439a9"},{"name":"memory-usage","duration":1,"timestamp":1068697259140,"id":18,"parentId":16,"tags":{"url":"/","memory.rss":"444776448","memory.heapUsed":"140366208","memory.heapTotal":"156090368"},"startTime":1794056410757,"traceId":"af8a14a195f439a9"},{"name":"ensure-page","duration":12173,"timestamp":1068708712139,"id":19,"parentId":3,"tags":{"inputPage":"/page"},"startTime":1794056422210,"traceId":"af8a14a195f439a9"},{"name":"handle-request","duration":1978833,"timestamp":1068708725003,"id":20,"parentId":1,"tags":{"url":"/"},"startTime":1794056422223,"traceId":"af8a14a195f439a9"},{"name":"memory-usage","duration":4,"timestamp":1068710703953,"id":21,"parentId":20,"tags":{"url":"/","memory.rss":"423477248","memory.heapUsed":"159825624","memory.heapTotal":"190545920"},"startTime":1794056424202,"traceId":"af8a14a195f439a9"},{"name":"render-path","duration":1977437,"timestamp":1068708727195,"id":22,"parentId":1,"tags":{"path":"/"},"startTime":1794056422225,"traceId":"af8a14a195f439a9"},{"name":"ensure-page","duration":8864,"timestamp":1068775654851,"id":23,"parentId":3,"tags":{"inputPage":"/page"},"startTime":1794056489153,"traceId":"af8a14a195f439a9"},{"name":"handle-request","duration":438827,"timestamp":1068775664255,"id":24,"parentId":1,"tags":{"url":"/"},"startTime":1794056489162,"traceId":"af8a14a195f439a9"},{"name":"memory-usage","duration":3,"timestamp":1068776103141,"id":25,"parentId":24,"tags":{"url":"/","memory.rss":"368033792","memory.heapUsed":"156854104","memory.heapTotal":"191627264"},"startTime":1794056489601,"traceId":"af8a14a195f439a9"},{"name":"render-path","duration":436345,"timestamp":1068775667803,"id":26,"parentId":1,"tags":{"path":"/"},"startTime":1794056489165,"traceId":"af8a14a195f439a9"},{"name":"turbopack-persistence","duration":94000,"timestamp":1069147342746,"id":27,"parentId":3,"tags":{"reason":"idle timeout","snapshot_duration_ms":8.208,"persist_duration_ms":85.365333,"task_count":2688,"bytes_written":4056739,"bytes_deleted":0},"startTime":1794056860842,"traceId":"af8a14a195f439a9"}] +[{"name":"turbopack-compaction","duration":58000,"timestamp":1069147437044,"id":29,"parentId":3,"tags":{"bytes_written":1517,"bytes_deleted":2555},"startTime":1794056860936,"traceId":"af8a14a195f439a9"}] diff --git a/deploy/up_next_h5_prod.sh b/deploy/up_next_h5_prod.sh index a39b2e7..2d05401 100644 --- a/deploy/up_next_h5_prod.sh +++ b/deploy/up_next_h5_prod.sh @@ -63,6 +63,8 @@ while IFS= read -r entry; do esac done < "$UPLOAD/types" STAGING=$(mktemp -d "$DIR/.prod-release.XXXXXX") +# mktemp -d 建的目录是 700,换上线后非 root 的 Supervisor 进程进不去会 spawn error;改成常规的 755。 +chmod 755 "$STAGING" tar -xzf "$UPLOAD/$PACKAGE_NAME" -C "$STAGING" --no-same-owner --no-same-permissions [ -z "$(find "$STAGING" -type l -print -quit)" ] || fail '生产包不允许符号链接' # standalone 打包:start.mjs + server.js + .next + public + config/production.env + node_modules/dotenv diff --git a/deploy_prod.sh b/deploy_prod.sh index e8e23cb..aef3cf5 100755 --- a/deploy_prod.sh +++ b/deploy_prod.sh @@ -30,8 +30,10 @@ LINUX_DIST="$DIR/dist/production-linux-x64-glibc" echo "[3/5] 生成 tar.gz 和 SHA-256..." # 从 dist/production-linux-x64-glibc/ 下进入打 tar,避免外层目录名出现在压缩包里;up_next_h5_prod.sh 预期入口在根(start.mjs 等)。 -# --no-xattrs 去 macOS 扩展属性噪音;包含 Linux sharp 原生 .node,远端无需 npm ci。 -(cd "$LINUX_DIST" && tar --no-xattrs --exclude='.DS_Store' --exclude='node_modules/@img/sharp-darwin-arm64' --exclude='node_modules/@img/sharp-libvips-darwin-arm64' -czf "$STAGE/$PACKAGE_NAME" --owner=0 --group=0 .) +# -h 把 pnpm 的符号链接展开成真实文件(远端只接受普通文件和目录);--no-xattrs 去 macOS 扩展属性噪音;包含 Linux sharp 原生 .node,远端无需 npm ci。 +# 属主归零:GNU tar 用 --owner/--group,macOS 自带 bsdtar 用 --uid/--gid。 +if tar --version 2>/dev/null | grep -q 'GNU tar'; then OWNER_OPTS=(--owner=0 --group=0); else OWNER_OPTS=(--uid 0 --gid 0); fi +(cd "$LINUX_DIST" && tar -h --no-xattrs --exclude='.DS_Store' --exclude='*sharp-darwin-arm64*' --exclude='*sharp-libvips-darwin-arm64*' "${OWNER_OPTS[@]}" -czf "$STAGE/$PACKAGE_NAME" .) (cd "$STAGE" && shasum -a 256 "$PACKAGE_NAME" > "$PACKAGE_NAME.sha256") ls -lh "$STAGE/$PACKAGE_NAME" "$STAGE/$PACKAGE_NAME.sha256"