部署脚本修改

This commit is contained in:
谢宇宁
2026-11-07 20:11:51 +07:00
parent b20c81f55b
commit be1e6b2f26
7 changed files with 28 additions and 3 deletions
+2
View File
@@ -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