From 43bd26d83ae2301c2d2f1fd05712fc8787bcd276 Mon Sep 17 00:00:00 2001 From: zzx-coder <2293314358@qq.com> Date: Tue, 12 May 2026 23:09:28 +0800 Subject: [PATCH 1/2] fix: increase Node.js memory limit for build process --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index ba8c7e2..4f55bf6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,8 +25,8 @@ RUN npm install --legacy-peer-deps # 复制项目文件 COPY . . -# 构建应用 -RUN npm run build +# 构建应用(增加内存限制) +RUN NODE_OPTIONS="--max-old-space-size=4096" npm run build # 暴露端口 EXPOSE 3000 @@ -34,6 +34,7 @@ EXPOSE 3000 # 设置环境变量 ENV NODE_ENV=production ENV PORT=3000 +ENV NODE_OPTIONS=--max-old-space-size=4096 # 健康检查 HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \ -- 2.34.1 From 9f84857c780b64d23f08f7a30c0170f8f2cd2104 Mon Sep 17 00:00:00 2001 From: zzx-coder <2293314358@qq.com> Date: Tue, 12 May 2026 23:18:20 +0800 Subject: [PATCH 2/2] fix: upgrade to Node.js 20 to meet Docusaurus 3.x requirements --- Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4f55bf6..597e466 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM crpi-1x701qgqjia2gdeu.cn-chengdu.personal.cr.aliyuncs.com/gitlink-help-center/gitlink-help-center:node-18-alpine +FROM crpi-1x701qgqjia2gdeu.cn-chengdu.personal.cr.aliyuncs.com/gitlink-help-center/gitlink-help-center:node-20-alpine LABEL maintainer="yuankaifneg <2894340009@qq.com>" # 设置为root用户以安装系统依赖 @@ -25,8 +25,8 @@ RUN npm install --legacy-peer-deps # 复制项目文件 COPY . . -# 构建应用(增加内存限制) -RUN NODE_OPTIONS="--max-old-space-size=4096" npm run build +# 构建应用 +RUN npm run build # 暴露端口 EXPOSE 3000 @@ -34,7 +34,6 @@ EXPOSE 3000 # 设置环境变量 ENV NODE_ENV=production ENV PORT=3000 -ENV NODE_OPTIONS=--max-old-space-size=4096 # 健康检查 HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \ -- 2.34.1